home *** CD-ROM | disk | FTP | other *** search
/ Delphi Informant Complete 1995 - 2000 / Delphi Informant Complete 1995 to 2000.iso / Delphi Informant Magazine Complete Works SOURCE CODE 1998.rar / 1998 / Sep / di9809am / Compont / Sample2 / Tapi.pas < prev    next >
Pascal/Delphi Source File  |  1997-12-01  |  160KB  |  4,632 lines

  1. unit Tapi;
  2.  
  3. {-----------------------------------------------------------------------------
  4.   This unit has been brought to you by the volunteers of the JEDI project.
  5.   To learn more about the JEDI project, please visit
  6.      http://www.delphi-jedi.org/
  7.  
  8.               J E D I  (Joint Endeavor of Delphi Innovators)
  9.  
  10.   Unit:       tspi.pas
  11.   Source:     tspi.h
  12.   Location:   http://www.delphi-jedi.org/apilib/tapi.zip
  13.   Team:       Team 1
  14.   Released:   1997-11-11 (for testing)
  15.  
  16.   Note: Conversion notes may be located by searching for the keyword "JEDI".
  17.  
  18.   Translators
  19.   -----------
  20.     Alexander Staubo <alex@image.no>
  21.     Brad Choate <choate@delphiexchange.com>
  22.  
  23.   Revision History
  24.   ----------------
  25.     1996-11-25 -AS  Initial translation.
  26.     1997-11-11 -BC  Minor revisions for the JEDI release-- see "JEDI" comments.
  27.     1997-11-12 -BC  Revised unit to match latest tapi.h (2.02)
  28.     1997-11-16 -BC  Reintroduced UNICODE translations.
  29.  
  30.   Notes
  31.   -----
  32.     - Version define TAPI_CURRENT_VERSION has been converted to a constant
  33.       and conditional code depending on this value changed to the conditional 
  34.       define "Tapi_Ver20". - AS
  35.  
  36.     - Type aliases for UNICODE omitted. - AS
  37.  
  38.     - Output pointer arguments such as LPDWORD have not been converted to
  39.       "var" parameters. It would require looking up every TAPI function in 
  40.       the SDK help files and verifying each parameter, since a nil value may 
  41.       be passed for some of these parameters. Anyone interested? - AS
  42.  
  43.     - The TapiCheck() function does not, for some reason, produce a valid 
  44.       error message. Until this is fixed, access the error codes (LINEERR_, 
  45.       PHONEERR_ etc.) directly. - AS
  46.  
  47.     - The TapiError() function assumes that TAPI error codes are always 
  48.       negative; I am not sure if this rule is consistently implemented 
  49.       throughout TAPI, although I think is. - AS
  50.  
  51.     - Constructs and text introduced by translator is prefixed with the
  52.       characters "!!". - AS
  53.  
  54.     - Original time stamp of tapi.h: 09-aug-96 00:30 - AS
  55.  
  56.     - Changed $define from Tapi_Ver20 to Tapi_Ver20_ORGREATER and also
  57.       added Tapi_Ver20_GREATER to support logic in 2.1 tapi.h. - BC
  58.  
  59.     - Note with regard to Delphi 1 support.  There are some IFDEF Win32 
  60.       checks in this file, but currently, this will not compile for Delphi 1.  
  61.       I have another version of this file which has better Delphi 1 
  62.       compatibility, but it will still fail on compile due to the number of 
  63.       symbols (compiler gives "Too many symbols" error).  My guess is the 
  64.       only way around this is to change DLL references from named to index 
  65.       references. - BC
  66.  
  67.     - UNICODE type aliases reintroduced. - BC
  68.  
  69.     - For compiling for TAPI 1.4 support, add Tapi_Ver14 to your project's
  70.       conditional defines (Project Info Dialog), make tapi.pas part of your
  71.       project, then build all.
  72.  
  73. -----------------------------------------------------------------------------}
  74.  
  75. {!! The following define enables support for TAPI 2.1 }
  76. {$IFNDEF Tapi_Ver14}
  77. {$DEFINE Tapi_Ver20_ORGREATER}
  78. {$DEFINE Tapi_Ver20_GREATER}
  79. {$ENDIF}
  80.  
  81. (*++ BUILD Version: 0000    // Increment this if a change has global effects
  82.  
  83. The  Telephony  API  is jointly copyrighted by Intel and Microsoft.  You are
  84. granted  a royalty free worldwide, unlimited license to make copies, and use
  85. the   API/SPI  for  making  applications/drivers  that  interface  with  the
  86. specification provided that this paragraph and the Intel/Microsoft copyright
  87. statement is maintained as is in the text and source code files.
  88.  
  89. Copyright 1995-96 Microsoft, all rights reserved.
  90. Portions copyright 1992, 1993 Intel/Microsoft, all rights reserved.
  91.  
  92. Module Name:
  93.  
  94.     tapi.h
  95.  
  96. Notes:
  97.  
  98.     Additions to the Telephony Application Programming Interface (TAPI) since
  99.     version 1.0 are noted by version number (e.g. "TAPI v1.4").
  100.  
  101. --*)
  102.  
  103. interface
  104.  
  105. uses
  106.   Windows, Messages;
  107.  
  108. (*
  109. //  -- TAPI VERSION INFO -- TAPI VERSION INFO -- TAPI VERSION INFO --
  110. //  -- TAPI VERSION INFO -- TAPI VERSION INFO -- TAPI VERSION INFO --
  111. //  -- TAPI VERSION INFO -- TAPI VERSION INFO -- TAPI VERSION INFO --
  112. //
  113. // To build  a TAPI 1.4 application define Tapi_Ver14 in your project's
  114. // conditional defines.
  115. //
  116. *)
  117.  
  118. const
  119. {$IFNDEF Tapi_Ver14}
  120.   TAPI_CURRENT_VERSION = $00020002;
  121. {$ELSE}
  122.   TAPI_CURRENT_VERSION = $00010004;
  123. {$ENDIF}
  124.  
  125. {$ALIGN OFF}       {!! Added; all records implicitly declared as "packed"}
  126.  
  127. {!! The above line should correspond to:
  128.  
  129. #pragma pack(1)
  130. // Type definitions of the data types used in tapi
  131. }
  132.  
  133. type
  134.   {!! C compatibility types, added }
  135.   INT = Longint;
  136.   LONG = Longint;
  137.   LPVOID = Pointer;
  138.   {!!}
  139.  
  140. (*
  141. // TAPI type definitions
  142. *)
  143.  
  144. type
  145.   HCALL__ =
  146.     record
  147.       unused: INT;
  148.     end;
  149.   HCALL = HCALL__;
  150.   LPHCALL = ^HCALL;
  151.  
  152.   HLINE__ =
  153.     record
  154.       unused: INT;
  155.     end;
  156.   HLINE = HLINE__;
  157.   LPHLINE = ^HLINE;
  158.  
  159.   HPHONE__ =
  160.     record
  161.       unused: INT;
  162.     end;
  163.   HPHONE = HPHONE__;
  164.   LPHPHONE = ^HPHONE;
  165.  
  166.   HLINEAPP__ =
  167.     record
  168.       unused: INT;
  169.     end;
  170.   HLINEAPP = HLINEAPP__;
  171.   LPHLINEAPP = ^HLINEAPP;
  172.  
  173.   HPHONEAPP__ =
  174.     record
  175.       unused: INT;
  176.     end;
  177.   HPHONEAPP = HPHONEAPP__;
  178.   LPHPHONEAPP = ^HPHONEAPP;
  179.  
  180.   LPHICON = ^HICON;
  181.  
  182.   TLINECALLBACK = procedure(hDevice,
  183.                             dwMessage,
  184.                             dwInstance,
  185.                             dwParam1,
  186.                             dwParam2,
  187.                             dwParam3: DWORD);
  188.                             stdcall;
  189.  
  190.   TPHONECALLBACK = procedure(hDevice,
  191.                              dwMessage,
  192.                              dwInstance,
  193.                              dwParam1,
  194.                              dwParam2,
  195.                              dwParam3: DWORD);
  196.                              stdcall;
  197.  
  198.  
  199. {// Messages for Phones and Lines}
  200.  
  201. const
  202.   LINE_ADDRESSSTATE                       = 0;
  203.   LINE_CALLINFO                           = 1;
  204.   LINE_CALLSTATE                          = 2;
  205.   LINE_CLOSE                              = 3;
  206.   LINE_DEVSPECIFIC                        = 4;
  207.   LINE_DEVSPECIFICFEATURE                 = 5;
  208.   LINE_GATHERDIGITS                       = 6;
  209.   LINE_GENERATE                           = 7;
  210.   LINE_LINEDEVSTATE                       = 8;
  211.   LINE_MONITORDIGITS                      = 9;
  212.   LINE_MONITORMEDIA                       = 10;
  213.   LINE_MONITORTONE                        = 11;
  214.   LINE_REPLY                              = 12;
  215.   LINE_REQUEST                            = 13;
  216.   PHONE_BUTTON                            = 14;
  217.   PHONE_CLOSE                             = 15;
  218.   PHONE_DEVSPECIFIC                       = 16;
  219.   PHONE_REPLY                             = 17;
  220.   PHONE_STATE                             = 18;
  221.   LINE_CREATE                             = 19;            {// TAPI v1.4}
  222.   PHONE_CREATE                            = 20;            {// TAPI v1.4}
  223.  
  224. {$IFDEF Tapi_Ver20_ORGREATER}
  225.   LINE_AGENTSPECIFIC                      = 21;            {// TAPI v2.0}
  226.   LINE_AGENTSTATUS                        = 22;            {// TAPI v2.0}
  227.   LINE_APPNEWCALL                         = 23;            {// TAPI v2.0}
  228.   LINE_PROXYREQUEST                       = 24;            {// TAPI v2.0}
  229.   LINE_REMOVE                             = 25;            {// TAPI v2.0}
  230.   PHONE_REMOVE                            = 26;            {// TAPI v2.0}
  231. {$ENDIF}
  232.  
  233.  
  234.   INITIALIZE_NEGOTIATION                  = $FFFFFFFF;
  235.  
  236.   LINEADDRCAPFLAGS_FWDNUMRINGS            = $00000001;
  237.   LINEADDRCAPFLAGS_PICKUPGROUPID          = $00000002;
  238.   LINEADDRCAPFLAGS_SECURE                 = $00000004;
  239.   LINEADDRCAPFLAGS_BLOCKIDDEFAULT         = $00000008;
  240.   LINEADDRCAPFLAGS_BLOCKIDOVERRIDE        = $00000010;
  241.   LINEADDRCAPFLAGS_DIALED                 = $00000020;
  242.   LINEADDRCAPFLAGS_ORIGOFFHOOK            = $00000040;
  243.   LINEADDRCAPFLAGS_DESTOFFHOOK            = $00000080;
  244.   LINEADDRCAPFLAGS_FWDCONSULT             = $00000100;
  245.   LINEADDRCAPFLAGS_SETUPCONFNULL          = $00000200;
  246.   LINEADDRCAPFLAGS_AUTORECONNECT          = $00000400;
  247.   LINEADDRCAPFLAGS_COMPLETIONID           = $00000800;
  248.   LINEADDRCAPFLAGS_TRANSFERHELD           = $00001000;
  249.   LINEADDRCAPFLAGS_TRANSFERMAKE           = $00002000;
  250.   LINEADDRCAPFLAGS_CONFERENCEHELD         = $00004000;
  251.   LINEADDRCAPFLAGS_CONFERENCEMAKE         = $00008000;
  252.   LINEADDRCAPFLAGS_PARTIALDIAL            = $00010000;
  253.   LINEADDRCAPFLAGS_FWDSTATUSVALID         = $00020000;
  254.   LINEADDRCAPFLAGS_FWDINTEXTADDR          = $00040000;
  255.   LINEADDRCAPFLAGS_FWDBUSYNAADDR          = $00080000;
  256.   LINEADDRCAPFLAGS_ACCEPTTOALERT          = $00100000;
  257.   LINEADDRCAPFLAGS_CONFDROP               = $00200000;
  258.   LINEADDRCAPFLAGS_PICKUPCALLWAIT         = $00400000;
  259. {$IFDEF Tapi_Ver20_ORGREATER}
  260.   LINEADDRCAPFLAGS_PREDICTIVEDIALER       = $00800000;     {// TAPI v2.0}
  261.   LINEADDRCAPFLAGS_QUEUE                  = $01000000;     {// TAPI v2.0}
  262.   LINEADDRCAPFLAGS_ROUTEPOINT             = $02000000;     {// TAPI v2.0}
  263.   LINEADDRCAPFLAGS_HOLDMAKESNEW           = $04000000;     {// TAPI v2.0}
  264.   LINEADDRCAPFLAGS_NOINTERNALCALLS        = $08000000;     {// TAPI v2.0}
  265.   LINEADDRCAPFLAGS_NOEXTERNALCALLS        = $10000000;     {// TAPI v2.0}
  266.   LINEADDRCAPFLAGS_SETCALLINGID           = $20000000;     {// TAPI v2.0}
  267. {$ENDIF}
  268.  
  269.   LINEADDRESSMODE_ADDRESSID               = $00000001;
  270.   LINEADDRESSMODE_DIALABLEADDR            = $00000002;
  271.  
  272.   LINEADDRESSSHARING_PRIVATE              = $00000001;
  273.   LINEADDRESSSHARING_BRIDGEDEXCL          = $00000002;
  274.   LINEADDRESSSHARING_BRIDGEDNEW           = $00000004;
  275.   LINEADDRESSSHARING_BRIDGEDSHARED        = $00000008;
  276.   LINEADDRESSSHARING_MONITORED            = $00000010;
  277.  
  278.   LINEADDRESSSTATE_OTHER                  = $00000001;
  279.   LINEADDRESSSTATE_DEVSPECIFIC            = $00000002;
  280.   LINEADDRESSSTATE_INUSEZERO              = $00000004;
  281.   LINEADDRESSSTATE_INUSEONE               = $00000008;
  282.   LINEADDRESSSTATE_INUSEMANY              = $00000010;
  283.   LINEADDRESSSTATE_NUMCALLS               = $00000020;
  284.   LINEADDRESSSTATE_FORWARD                = $00000040;
  285.   LINEADDRESSSTATE_TERMINALS              = $00000080;
  286.   LINEADDRESSSTATE_CAPSCHANGE             = $00000100;     {// TAPI v1.4}
  287.  
  288.   LINEADDRFEATURE_FORWARD                 = $00000001;
  289.   LINEADDRFEATURE_MAKECALL                = $00000002;
  290.   LINEADDRFEATURE_PICKUP                  = $00000004;
  291.   LINEADDRFEATURE_SETMEDIACONTROL         = $00000008;
  292.   LINEADDRFEATURE_SETTERMINAL             = $00000010;
  293.   LINEADDRFEATURE_SETUPCONF               = $00000020;
  294.   LINEADDRFEATURE_UNCOMPLETECALL          = $00000040;
  295.   LINEADDRFEATURE_UNPARK                  = $00000080;
  296. {$IFDEF Tapi_Ver20_ORGREATER}
  297.   LINEADDRFEATURE_PICKUPHELD              = $00000100;     {// TAPI v2.0}
  298.   LINEADDRFEATURE_PICKUPGROUP             = $00000200;     {// TAPI v2.0}
  299.   LINEADDRFEATURE_PICKUPDIRECT            = $00000400;     {// TAPI v2.0}
  300.   LINEADDRFEATURE_PICKUPWAITING           = $00000800;     {// TAPI v2.0}
  301.   LINEADDRFEATURE_FORWARDFWD              = $00001000;     {// TAPI v2.0}
  302.   LINEADDRFEATURE_FORWARDDND              = $00002000;     {// TAPI v2.0}
  303. {$ENDIF}
  304.  
  305. {$IFDEF Tapi_Ver20_ORGREATER}
  306.   LINEAGENTFEATURE_SETAGENTGROUP          = $00000001;     {// TAPI v2.0}
  307.   LINEAGENTFEATURE_SETAGENTSTATE          = $00000002;     {// TAPI v2.0}
  308.   LINEAGENTFEATURE_SETAGENTACTIVITY       = $00000004;     {// TAPI v2.0}
  309.   LINEAGENTFEATURE_AGENTSPECIFIC          = $00000008;     {// TAPI v2.0}
  310.   LINEAGENTFEATURE_GETAGENTACTIVITYLIST   = $00000010;     {// TAPI v2.0}
  311.   LINEAGENTFEATURE_GETAGENTGROUP          = $00000020;     {// TAPI v2.0}
  312.  
  313.   LINEAGENTSTATE_LOGGEDOFF                = $00000001;     {// TAPI v2.0}
  314.   LINEAGENTSTATE_NOTREADY                 = $00000002;     {// TAPI v2.0}
  315.   LINEAGENTSTATE_READY                    = $00000004;     {// TAPI v2.0}
  316.   LINEAGENTSTATE_BUSYACD                  = $00000008;     {// TAPI v2.0}
  317.   LINEAGENTSTATE_BUSYINCOMING             = $00000010;     {// TAPI v2.0}
  318.   LINEAGENTSTATE_BUSYOUTBOUND             = $00000020;     {// TAPI v2.0}
  319.   LINEAGENTSTATE_BUSYOTHER                = $00000040;     {// TAPI v2.0}
  320.   LINEAGENTSTATE_WORKINGAFTERCALL         = $00000080;     {// TAPI v2.0}
  321.   LINEAGENTSTATE_UNKNOWN                  = $00000100;     {// TAPI v2.0}
  322.   LINEAGENTSTATE_UNAVAIL                  = $00000200;     {// TAPI v2.0}
  323.  
  324.   LINEAGENTSTATUS_GROUP                   = $00000001;     {// TAPI v2.0}
  325.   LINEAGENTSTATUS_STATE                   = $00000002;     {// TAPI v2.0}
  326.   LINEAGENTSTATUS_NEXTSTATE               = $00000004;     {// TAPI v2.0}
  327.   LINEAGENTSTATUS_ACTIVITY                = $00000008;     {// TAPI v2.0}
  328.   LINEAGENTSTATUS_ACTIVITYLIST            = $00000010;     {// TAPI v2.0}
  329.   LINEAGENTSTATUS_GROUPLIST               = $00000020;     {// TAPI v2.0}
  330.   LINEAGENTSTATUS_CAPSCHANGE              = $00000040;     {// TAPI v2.0}
  331.   LINEAGENTSTATUS_VALIDSTATES             = $00000080;     {// TAPI v2.0}
  332.   LINEAGENTSTATUS_VALIDNEXTSTATES         = $00000100;     {// TAPI v2.0}
  333. {$ENDIF}
  334.  
  335.  
  336.   LINEANSWERMODE_NONE                     = $00000001;
  337.   LINEANSWERMODE_DROP                     = $00000002;
  338.   LINEANSWERMODE_HOLD                     = $00000004;
  339.  
  340.   LINEBEARERMODE_VOICE                    = $00000001;
  341.   LINEBEARERMODE_SPEECH                   = $00000002;
  342.   LINEBEARERMODE_MULTIUSE                 = $00000004;
  343.   LINEBEARERMODE_DATA                     = $00000008;
  344.   LINEBEARERMODE_ALTSPEECHDATA            = $00000010;
  345.   LINEBEARERMODE_NONCALLSIGNALING         = $00000020;
  346.   LINEBEARERMODE_PASSTHROUGH              = $00000040;     {// TAPI v1.4}
  347. {$IFDEF Tapi_Ver20_ORGREATER}
  348.   LINEBEARERMODE_RESTRICTEDDATA           = $00000080;     {// TAPI v2.0}
  349. {$ENDIF}
  350.  
  351.   LINEBUSYMODE_STATION                    = $00000001;
  352.   LINEBUSYMODE_TRUNK                      = $00000002;
  353.   LINEBUSYMODE_UNKNOWN                    = $00000004;
  354.   LINEBUSYMODE_UNAVAIL                    = $00000008;
  355.  
  356.   LINECALLCOMPLCOND_BUSY                  = $00000001;
  357.   LINECALLCOMPLCOND_NOANSWER              = $00000002;
  358.  
  359.   LINECALLCOMPLMODE_CAMPON                = $00000001;
  360.   LINECALLCOMPLMODE_CALLBACK              = $00000002;
  361.   LINECALLCOMPLMODE_INTRUDE               = $00000004;
  362.   LINECALLCOMPLMODE_MESSAGE               = $00000008;
  363.  
  364.   LINECALLFEATURE_ACCEPT                  = $00000001;
  365.   LINECALLFEATURE_ADDTOCONF               = $00000002;
  366.   LINECALLFEATURE_ANSWER                  = $00000004;
  367.   LINECALLFEATURE_BLINDTRANSFER           = $00000008;
  368.   LINECALLFEATURE_COMPLETECALL            = $00000010;
  369.   LINECALLFEATURE_COMPLETETRANSF          = $00000020;
  370.   LINECALLFEATURE_DIAL                    = $00000040;
  371.   LINECALLFEATURE_DROP                    = $00000080;
  372.   LINECALLFEATURE_GATHERDIGITS            = $00000100;
  373.   LINECALLFEATURE_GENERATEDIGITS          = $00000200;
  374.   LINECALLFEATURE_GENERATETONE            = $00000400;
  375.   LINECALLFEATURE_HOLD                    = $00000800;
  376.   LINECALLFEATURE_MONITORDIGITS           = $00001000;
  377.   LINECALLFEATURE_MONITORMEDIA            = $00002000;
  378.   LINECALLFEATURE_MONITORTONES            = $00004000;
  379.   LINECALLFEATURE_PARK                    = $00008000;
  380.   LINECALLFEATURE_PREPAREADDCONF          = $00010000;
  381.   LINECALLFEATURE_REDIRECT                = $00020000;
  382.   LINECALLFEATURE_REMOVEFROMCONF          = $00040000;
  383.   LINECALLFEATURE_SECURECALL              = $00080000;
  384.   LINECALLFEATURE_SENDUSERUSER            = $00100000;
  385.   LINECALLFEATURE_SETCALLPARAMS           = $00200000;
  386.   LINECALLFEATURE_SETMEDIACONTROL         = $00400000;
  387.   LINECALLFEATURE_SETTERMINAL             = $00800000;
  388.   LINECALLFEATURE_SETUPCONF               = $01000000;
  389.   LINECALLFEATURE_SETUPTRANSFER           = $02000000;
  390.   LINECALLFEATURE_SWAPHOLD                = $04000000;
  391.   LINECALLFEATURE_UNHOLD                  = $08000000;
  392.   LINECALLFEATURE_RELEASEUSERUSERINFO     = $10000000;     {// TAPI v1.4}
  393. {$IFDEF Tapi_Ver20_ORGREATER}
  394.   LINECALLFEATURE_SETTREATMENT            = $20000000;     {// TAPI v2.0}
  395.   LINECALLFEATURE_SETQOS                  = $40000000;     {// TAPI v2.0}
  396.   LINECALLFEATURE_SETCALLDATA             = $80000000;     {// TAPI v2.0}
  397. {$ENDIF}
  398.  
  399. {$IFDEF Tapi_Ver20_ORGREATER}
  400.   LINECALLFEATURE2_NOHOLDCONFERENCE       = $00000001;     {// TAPI v2.0}
  401.   LINECALLFEATURE2_ONESTEPTRANSFER        = $00000002;     {// TAPI v2.0}
  402.   LINECALLFEATURE2_COMPLCAMPON            = $00000004;     {// TAPI v2.0}
  403.   LINECALLFEATURE2_COMPLCALLBACK          = $00000008;     {// TAPI v2.0}
  404.   LINECALLFEATURE2_COMPLINTRUDE           = $00000010;     {// TAPI v2.0}
  405.   LINECALLFEATURE2_COMPLMESSAGE           = $00000020;     {// TAPI v2.0}
  406.   LINECALLFEATURE2_TRANSFERNORM           = $00000040;     {// TAPI v2.0}
  407.   LINECALLFEATURE2_TRANSFERCONF           = $00000080;     {// TAPI v2.0}
  408.   LINECALLFEATURE2_PARKDIRECT             = $00000100;     {// TAPI v2.0}
  409.   LINECALLFEATURE2_PARKNONDIRECT          = $00000200;     {// TAPI v2.0}
  410. {$ENDIF}
  411.  
  412.   LINECALLINFOSTATE_OTHER                 = $00000001;
  413.   LINECALLINFOSTATE_DEVSPECIFIC           = $00000002;
  414.   LINECALLINFOSTATE_BEARERMODE            = $00000004;
  415.   LINECALLINFOSTATE_RATE                  = $00000008;
  416.   LINECALLINFOSTATE_MEDIAMODE             = $00000010;
  417.   LINECALLINFOSTATE_APPSPECIFIC           = $00000020;
  418.   LINECALLINFOSTATE_CALLID                = $00000040;
  419.   LINECALLINFOSTATE_RELATEDCALLID         = $00000080;
  420.   LINECALLINFOSTATE_ORIGIN                = $00000100;
  421.   LINECALLINFOSTATE_REASON                = $00000200;
  422.   LINECALLINFOSTATE_COMPLETIONID          = $00000400;
  423.   LINECALLINFOSTATE_NUMOWNERINCR          = $00000800;
  424.   LINECALLINFOSTATE_NUMOWNERDECR          = $00001000;
  425.   LINECALLINFOSTATE_NUMMONITORS           = $00002000;
  426.   LINECALLINFOSTATE_TRUNK                 = $00004000;
  427.   LINECALLINFOSTATE_CALLERID              = $00008000;
  428.   LINECALLINFOSTATE_CALLEDID              = $00010000;
  429.   LINECALLINFOSTATE_CONNECTEDID           = $00020000;
  430.   LINECALLINFOSTATE_REDIRECTIONID         = $00040000;
  431.   LINECALLINFOSTATE_REDIRECTINGID         = $00080000;
  432.   LINECALLINFOSTATE_DISPLAY               = $00100000;
  433.   LINECALLINFOSTATE_USERUSERINFO          = $00200000;
  434.   LINECALLINFOSTATE_HIGHLEVELCOMP         = $00400000;
  435.   LINECALLINFOSTATE_LOWLEVELCOMP          = $00800000;
  436.   LINECALLINFOSTATE_CHARGINGINFO          = $01000000;
  437.   LINECALLINFOSTATE_TERMINAL              = $02000000;
  438.   LINECALLINFOSTATE_DIALPARAMS            = $04000000;
  439.   LINECALLINFOSTATE_MONITORMODES          = $08000000;
  440. {$IFDEF Tapi_Ver20_ORGREATER}
  441.   LINECALLINFOSTATE_TREATMENT             = $10000000;     {// TAPI v2.0}
  442.   LINECALLINFOSTATE_QOS                   = $20000000;     {// TAPI v2.0}
  443.   LINECALLINFOSTATE_CALLDATA              = $40000000;     {// TAPI v2.0}
  444. {$ENDIF}
  445.  
  446.   LINECALLORIGIN_OUTBOUND                 = $00000001;
  447.   LINECALLORIGIN_INTERNAL                 = $00000002;
  448.   LINECALLORIGIN_EXTERNAL                 = $00000004;
  449.   LINECALLORIGIN_UNKNOWN                  = $00000010;
  450.   LINECALLORIGIN_UNAVAIL                  = $00000020;
  451.   LINECALLORIGIN_CONFERENCE               = $00000040;
  452.   LINECALLORIGIN_INBOUND                  = $00000080;     {// TAPI v1.4}
  453.  
  454.   LINECALLPARAMFLAGS_SECURE               = $00000001;
  455.   LINECALLPARAMFLAGS_IDLE                 = $00000002;
  456.   LINECALLPARAMFLAGS_BLOCKID              = $00000004;
  457.   LINECALLPARAMFLAGS_ORIGOFFHOOK          = $00000008;
  458.   LINECALLPARAMFLAGS_DESTOFFHOOK          = $00000010;
  459. {$IFDEF Tapi_Ver20_ORGREATER}
  460.   LINECALLPARAMFLAGS_NOHOLDCONFERENCE     = $00000020;     {// TAPI v2.0}
  461.   LINECALLPARAMFLAGS_PREDICTIVEDIAL       = $00000040;     {// TAPI v2.0}
  462.   LINECALLPARAMFLAGS_ONESTEPTRANSFER      = $00000080;     {// TAPI v2.0}
  463. {$ENDIF}
  464.  
  465.   LINECALLPARTYID_BLOCKED                 = $00000001;
  466.   LINECALLPARTYID_OUTOFAREA               = $00000002;
  467.   LINECALLPARTYID_NAME                    = $00000004;
  468.   LINECALLPARTYID_ADDRESS                 = $00000008;
  469.   LINECALLPARTYID_PARTIAL                 = $00000010;
  470.   LINECALLPARTYID_UNKNOWN                 = $00000020;
  471.   LINECALLPARTYID_UNAVAIL                 = $00000040;
  472.  
  473.   LINECALLPRIVILEGE_NONE                  = $00000001;
  474.   LINECALLPRIVILEGE_MONITOR               = $00000002;
  475.   LINECALLPRIVILEGE_OWNER                 = $00000004;
  476.  
  477.   LINECALLREASON_DIRECT                   = $00000001;
  478.   LINECALLREASON_FWDBUSY                  = $00000002;
  479.   LINECALLREASON_FWDNOANSWER              = $00000004;
  480.   LINECALLREASON_FWDUNCOND                = $00000008;
  481.   LINECALLREASON_PICKUP                   = $00000010;
  482.   LINECALLREASON_UNPARK                   = $00000020;
  483.   LINECALLREASON_REDIRECT                 = $00000040;
  484.   LINECALLREASON_CALLCOMPLETION           = $00000080;
  485.   LINECALLREASON_TRANSFER                 = $00000100;
  486.   LINECALLREASON_REMINDER                 = $00000200;
  487.   LINECALLREASON_UNKNOWN                  = $00000400;
  488.   LINECALLREASON_UNAVAIL                  = $00000800;
  489.   LINECALLREASON_INTRUDE                  = $00001000;     {// TAPI v1.4}
  490.   LINECALLREASON_PARKED                   = $00002000;     {// TAPI v1.4}
  491. {$IFDEF Tapi_Ver20_ORGREATER}
  492.   LINECALLREASON_CAMPEDON                 = $00004000;     {// TAPI v2.0}
  493.   LINECALLREASON_ROUTEREQUEST             = $00008000;     {// TAPI v2.0}
  494. {$ENDIF}
  495.  
  496.   LINECALLSELECT_LINE                     = $00000001;
  497.   LINECALLSELECT_ADDRESS                  = $00000002;
  498.   LINECALLSELECT_CALL                     = $00000004;
  499. {$IFDEF Tapi_Ver20_GREATER}
  500.   LINECALLSELECT_DEVICEID                 = $00000008;
  501. {$ENDIF}
  502.  
  503.   LINECALLSTATE_IDLE                      = $00000001;
  504.   LINECALLSTATE_OFFERING                  = $00000002;
  505.   LINECALLSTATE_ACCEPTED                  = $00000004;
  506.   LINECALLSTATE_DIALTONE                  = $00000008;
  507.   LINECALLSTATE_DIALING                   = $00000010;
  508.   LINECALLSTATE_RINGBACK                  = $00000020;
  509.   LINECALLSTATE_BUSY                      = $00000040;
  510.   LINECALLSTATE_SPECIALINFO               = $00000080;
  511.   LINECALLSTATE_CONNECTED                 = $00000100;
  512.   LINECALLSTATE_PROCEEDING                = $00000200;
  513.   LINECALLSTATE_ONHOLD                    = $00000400;
  514.   LINECALLSTATE_CONFERENCED               = $00000800;
  515.   LINECALLSTATE_ONHOLDPENDCONF            = $00001000;
  516.   LINECALLSTATE_ONHOLDPENDTRANSFER        = $00002000;
  517.   LINECALLSTATE_DISCONNECTED              = $00004000;
  518.   LINECALLSTATE_UNKNOWN                   = $00008000;
  519.  
  520. {$IFDEF Tapi_Ver20_ORGREATER}
  521.   LINECALLTREATMENT_SILENCE               = $00000001;     {// TAPI v2.0}
  522.   LINECALLTREATMENT_RINGBACK              = $00000002;     {// TAPI v2.0}
  523.   LINECALLTREATMENT_BUSY                  = $00000003;     {// TAPI v2.0}
  524.   LINECALLTREATMENT_MUSIC                 = $00000004;     {// TAPI v2.0}
  525. {$ENDIF}
  526.  
  527.   LINECARDOPTION_PREDEFINED               = $00000001;     {// TAPI v1.4}
  528.   LINECARDOPTION_HIDDEN                   = $00000002;     {// TAPI v1.4}
  529.  
  530.   LINECONNECTEDMODE_ACTIVE                = $00000001;     {// TAPI v1.4}
  531.   LINECONNECTEDMODE_INACTIVE              = $00000002;     {// TAPI v1.4}
  532. {$IFDEF Tapi_Ver20_ORGREATER}
  533.   LINECONNECTEDMODE_ACTIVEHELD            = $00000004;     {// TAPI v2.0}
  534.   LINECONNECTEDMODE_INACTIVEHELD          = $00000008;     {// TAPI v2.0}
  535.   LINECONNECTEDMODE_CONFIRMED             = $00000010;     {// TAPI v2.0}
  536. {$ENDIF}
  537.  
  538.   LINEDEVCAPFLAGS_CROSSADDRCONF           = $00000001;
  539.   LINEDEVCAPFLAGS_HIGHLEVCOMP             = $00000002;
  540.   LINEDEVCAPFLAGS_LOWLEVCOMP              = $00000004;
  541.   LINEDEVCAPFLAGS_MEDIACONTROL            = $00000008;
  542.   LINEDEVCAPFLAGS_MULTIPLEADDR            = $00000010;
  543.   LINEDEVCAPFLAGS_CLOSEDROP               = $00000020;
  544.   LINEDEVCAPFLAGS_DIALBILLING             = $00000040;
  545.   LINEDEVCAPFLAGS_DIALQUIET               = $00000080;
  546.   LINEDEVCAPFLAGS_DIALDIALTONE            = $00000100;
  547.  
  548.   LINEDEVSTATE_OTHER                      = $00000001;
  549.   LINEDEVSTATE_RINGING                    = $00000002;
  550.   LINEDEVSTATE_CONNECTED                  = $00000004;
  551.   LINEDEVSTATE_DISCONNECTED               = $00000008;
  552.   LINEDEVSTATE_MSGWAITON                  = $00000010;
  553.   LINEDEVSTATE_MSGWAITOFF                 = $00000020;
  554.   LINEDEVSTATE_INSERVICE                  = $00000040;
  555.   LINEDEVSTATE_OUTOFSERVICE               = $00000080;
  556.   LINEDEVSTATE_MAINTENANCE                = $00000100;
  557.   LINEDEVSTATE_OPEN                       = $00000200;
  558.   LINEDEVSTATE_CLOSE                      = $00000400;
  559.   LINEDEVSTATE_NUMCALLS                   = $00000800;
  560.   LINEDEVSTATE_NUMCOMPLETIONS             = $00001000;
  561.   LINEDEVSTATE_TERMINALS                  = $00002000;
  562.   LINEDEVSTATE_ROAMMODE                   = $00004000;
  563.   LINEDEVSTATE_BATTERY                    = $00008000;
  564.   LINEDEVSTATE_SIGNAL                     = $00010000;
  565.   LINEDEVSTATE_DEVSPECIFIC                = $00020000;
  566.   LINEDEVSTATE_REINIT                     = $00040000;
  567.   LINEDEVSTATE_LOCK                       = $00080000;
  568.   LINEDEVSTATE_CAPSCHANGE                 = $00100000;     {// TAPI v1.4}
  569.   LINEDEVSTATE_CONFIGCHANGE               = $00200000;     {// TAPI v1.4}
  570.   LINEDEVSTATE_TRANSLATECHANGE            = $00400000;     {// TAPI v1.4}
  571.   LINEDEVSTATE_COMPLCANCEL                = $00800000;     {// TAPI v1.4}
  572.   LINEDEVSTATE_REMOVED                    = $01000000;     {// TAPI v1.4}
  573.  
  574.   LINEDEVSTATUSFLAGS_CONNECTED            = $00000001;
  575.   LINEDEVSTATUSFLAGS_MSGWAIT              = $00000002;
  576.   LINEDEVSTATUSFLAGS_INSERVICE            = $00000004;
  577.   LINEDEVSTATUSFLAGS_LOCKED               = $00000008;
  578.  
  579.   LINEDIALTONEMODE_NORMAL                 = $00000001;
  580.   LINEDIALTONEMODE_SPECIAL                = $00000002;
  581.   LINEDIALTONEMODE_INTERNAL               = $00000004;
  582.   LINEDIALTONEMODE_EXTERNAL               = $00000008;
  583.   LINEDIALTONEMODE_UNKNOWN                = $00000010;
  584.   LINEDIALTONEMODE_UNAVAIL                = $00000020;
  585.  
  586.   LINEDIGITMODE_PULSE                     = $00000001;
  587.   LINEDIGITMODE_DTMF                      = $00000002;
  588.   LINEDIGITMODE_DTMFEND                   = $00000004;
  589.  
  590.   LINEDISCONNECTMODE_NORMAL               = $00000001;
  591.   LINEDISCONNECTMODE_UNKNOWN              = $00000002;
  592.   LINEDISCONNECTMODE_REJECT               = $00000004;
  593.   LINEDISCONNECTMODE_PICKUP               = $00000008;
  594.   LINEDISCONNECTMODE_FORWARDED            = $00000010;
  595.   LINEDISCONNECTMODE_BUSY                 = $00000020;
  596.   LINEDISCONNECTMODE_NOANSWER             = $00000040;
  597.   LINEDISCONNECTMODE_BADADDRESS           = $00000080;
  598.   LINEDISCONNECTMODE_UNREACHABLE          = $00000100;
  599.   LINEDISCONNECTMODE_CONGESTION           = $00000200;
  600.   LINEDISCONNECTMODE_INCOMPATIBLE         = $00000400;
  601.   LINEDISCONNECTMODE_UNAVAIL              = $00000800;
  602.   LINEDISCONNECTMODE_NODIALTONE           = $00001000;     {// TAPI v1.4}
  603. {$IFDEF Tapi_Ver20_ORGREATER}
  604.   LINEDISCONNECTMODE_NUMBERCHANGED        = $00002000;     {// TAPI v2.0}
  605.   LINEDISCONNECTMODE_OUTOFORDER           = $00004000;     {// TAPI v2.0}
  606.   LINEDISCONNECTMODE_TEMPFAILURE          = $00008000;     {// TAPI v2.0}
  607.   LINEDISCONNECTMODE_QOSUNAVAIL           = $00010000;     {// TAPI v2.0}
  608.   LINEDISCONNECTMODE_BLOCKED              = $00020000;     {// TAPI v2.0}
  609.   LINEDISCONNECTMODE_DONOTDISTURB         = $00040000;     {// TAPI v2.0}
  610.   LINEDISCONNECTMODE_CANCELLED            = $00080000;     {// TAPI v2.0}
  611. {$ENDIF}
  612.  
  613.   LINEERR_ALLOCATED                       = $80000001;
  614.   LINEERR_BADDEVICEID                     = $80000002;
  615.   LINEERR_BEARERMODEUNAVAIL               = $80000003;
  616.   LINEERR_CALLUNAVAIL                     = $80000005;
  617.   LINEERR_COMPLETIONOVERRUN               = $80000006;
  618.   LINEERR_CONFERENCEFULL                  = $80000007;
  619.   LINEERR_DIALBILLING                     = $80000008;
  620.   LINEERR_DIALDIALTONE                    = $80000009;
  621.   LINEERR_DIALPROMPT                      = $8000000A;
  622.   LINEERR_DIALQUIET                       = $8000000B;
  623.   LINEERR_INCOMPATIBLEAPIVERSION          = $8000000C;
  624.   LINEERR_INCOMPATIBLEEXTVERSION          = $8000000D;
  625.   LINEERR_INIFILECORRUPT                  = $8000000E;
  626.   LINEERR_INUSE                           = $8000000F;
  627.   LINEERR_INVALADDRESS                    = $80000010;
  628.   LINEERR_INVALADDRESSID                  = $80000011;
  629.   LINEERR_INVALADDRESSMODE                = $80000012;
  630.   LINEERR_INVALADDRESSSTATE               = $80000013;
  631.   LINEERR_INVALAPPHANDLE                  = $80000014;
  632.   LINEERR_INVALAPPNAME                    = $80000015;
  633.   LINEERR_INVALBEARERMODE                 = $80000016;
  634.   LINEERR_INVALCALLCOMPLMODE              = $80000017;
  635.   LINEERR_INVALCALLHANDLE                 = $80000018;
  636.   LINEERR_INVALCALLPARAMS                 = $80000019;
  637.   LINEERR_INVALCALLPRIVILEGE              = $8000001A;
  638.   LINEERR_INVALCALLSELECT                 = $8000001B;
  639.   LINEERR_INVALCALLSTATE                  = $8000001C;
  640.   LINEERR_INVALCALLSTATELIST              = $8000001D;
  641.   LINEERR_INVALCARD                       = $8000001E;
  642.   LINEERR_INVALCOMPLETIONID               = $8000001F;
  643.   LINEERR_INVALCONFCALLHANDLE             = $80000020;
  644.   LINEERR_INVALCONSULTCALLHANDLE          = $80000021;
  645.   LINEERR_INVALCOUNTRYCODE                = $80000022;
  646.   LINEERR_INVALDEVICECLASS                = $80000023;
  647.   LINEERR_INVALDEVICEHANDLE               = $80000024;
  648.   LINEERR_INVALDIALPARAMS                 = $80000025;
  649.   LINEERR_INVALDIGITLIST                  = $80000026;
  650.   LINEERR_INVALDIGITMODE                  = $80000027;
  651.   LINEERR_INVALDIGITS                     = $80000028;
  652.   LINEERR_INVALEXTVERSION                 = $80000029;
  653.   LINEERR_INVALGROUPID                    = $8000002A;
  654.   LINEERR_INVALLINEHANDLE                 = $8000002B;
  655.   LINEERR_INVALLINESTATE                  = $8000002C;
  656.   LINEERR_INVALLOCATION                   = $8000002D;
  657.   LINEERR_INVALMEDIALIST                  = $8000002E;
  658.   LINEERR_INVALMEDIAMODE                  = $8000002F;
  659.   LINEERR_INVALMESSAGEID                  = $80000030;
  660.   LINEERR_INVALPARAM                      = $80000032;
  661.   LINEERR_INVALPARKID                     = $80000033;
  662.   LINEERR_INVALPARKMODE                   = $80000034;
  663.   LINEERR_INVALPOINTER                    = $80000035;
  664.   LINEERR_INVALPRIVSELECT                 = $80000036;
  665.   LINEERR_INVALRATE                       = $80000037;
  666.   LINEERR_INVALREQUESTMODE                = $80000038;
  667.   LINEERR_INVALTERMINALID                 = $80000039;
  668.   LINEERR_INVALTERMINALMODE               = $8000003A;
  669.   LINEERR_INVALTIMEOUT                    = $8000003B;
  670.   LINEERR_INVALTONE                       = $8000003C;
  671.   LINEERR_INVALTONELIST                   = $8000003D;
  672.   LINEERR_INVALTONEMODE                   = $8000003E;
  673.   LINEERR_INVALTRANSFERMODE               = $8000003F;
  674.   LINEERR_LINEMAPPERFAILED                = $80000040;
  675.   LINEERR_NOCONFERENCE                    = $80000041;
  676.   LINEERR_NODEVICE                        = $80000042;
  677.   LINEERR_NODRIVER                        = $80000043;
  678.   LINEERR_NOMEM                           = $80000044;
  679.   LINEERR_NOREQUEST                       = $80000045;
  680.   LINEERR_NOTOWNER                        = $80000046;
  681.   LINEERR_NOTREGISTERED                   = $80000047;
  682.   LINEERR_OPERATIONFAILED                 = $80000048;
  683.   LINEERR_OPERATIONUNAVAIL                = $80000049;
  684.   LINEERR_RATEUNAVAIL                     = $8000004A;
  685.   LINEERR_RESOURCEUNAVAIL                 = $8000004B;
  686.   LINEERR_REQUESTOVERRUN                  = $8000004C;
  687.   LINEERR_STRUCTURETOOSMALL               = $8000004D;
  688.   LINEERR_TARGETNOTFOUND                  = $8000004E;
  689.   LINEERR_TARGETSELF                      = $8000004F;
  690.   LINEERR_UNINITIALIZED                   = $80000050;
  691.   LINEERR_USERUSERINFOTOOBIG              = $80000051;
  692.   LINEERR_REINIT                          = $80000052;
  693.   LINEERR_ADDRESSBLOCKED                  = $80000053;
  694.   LINEERR_BILLINGREJECTED                 = $80000054;
  695.   LINEERR_INVALFEATURE                    = $80000055;
  696.   LINEERR_NOMULTIPLEINSTANCE              = $80000056;
  697. {$IFDEF Tapi_Ver20_ORGREATER}
  698.   LINEERR_INVALAGENTID                    = $80000057;     {// TAPI v2.0}
  699.   LINEERR_INVALAGENTGROUP                 = $80000058;     {// TAPI v2.0}
  700.   LINEERR_INVALPASSWORD                   = $80000059;     {// TAPI v2.0}
  701.   LINEERR_INVALAGENTSTATE                 = $8000005A;     {// TAPI v2.0}
  702.   LINEERR_INVALAGENTACTIVITY              = $8000005B;     {// TAPI v2.0}
  703.   LINEERR_DIALVOICEDETECT                 = $8000005C;     {// TAPI v2.0}
  704. {$ENDIF}
  705.  
  706.   LINEFEATURE_DEVSPECIFIC                 = $00000001;
  707.   LINEFEATURE_DEVSPECIFICFEAT             = $00000002;
  708.   LINEFEATURE_FORWARD                     = $00000004;
  709.   LINEFEATURE_MAKECALL                    = $00000008;
  710.   LINEFEATURE_SETMEDIACONTROL             = $00000010;
  711.   LINEFEATURE_SETTERMINAL                 = $00000020;
  712. {$IFDEF Tapi_Ver20_ORGREATER}
  713.   LINEFEATURE_SETDEVSTATUS                = $00000040;     {// TAPI v2.0}
  714.   LINEFEATURE_FORWARDFWD                  = $00000080;     {// TAPI v2.0}
  715.   LINEFEATURE_FORWARDDND                  = $00000100;     {// TAPI v2.0}
  716. {$ENDIF}
  717.  
  718.   LINEFORWARDMODE_UNCOND                  = $00000001;
  719.   LINEFORWARDMODE_UNCONDINTERNAL          = $00000002;
  720.   LINEFORWARDMODE_UNCONDEXTERNAL          = $00000004;
  721.   LINEFORWARDMODE_UNCONDSPECIFIC          = $00000008;
  722.   LINEFORWARDMODE_BUSY                    = $00000010;
  723.   LINEFORWARDMODE_BUSYINTERNAL            = $00000020;
  724.   LINEFORWARDMODE_BUSYEXTERNAL            = $00000040;
  725.   LINEFORWARDMODE_BUSYSPECIFIC            = $00000080;
  726.   LINEFORWARDMODE_NOANSW                  = $00000100;
  727.   LINEFORWARDMODE_NOANSWINTERNAL          = $00000200;
  728.   LINEFORWARDMODE_NOANSWEXTERNAL          = $00000400;
  729.   LINEFORWARDMODE_NOANSWSPECIFIC          = $00000800;
  730.   LINEFORWARDMODE_BUSYNA                  = $00001000;
  731.   LINEFORWARDMODE_BUSYNAINTERNAL          = $00002000;
  732.   LINEFORWARDMODE_BUSYNAEXTERNAL          = $00004000;
  733.   LINEFORWARDMODE_BUSYNASPECIFIC          = $00008000;
  734.   LINEFORWARDMODE_UNKNOWN                 = $00010000;     {// TAPI v1.4}
  735.   LINEFORWARDMODE_UNAVAIL                 = $00020000;     {// TAPI v1.4}
  736.  
  737.   LINEGATHERTERM_BUFFERFULL               = $00000001;
  738.   LINEGATHERTERM_TERMDIGIT                = $00000002;
  739.   LINEGATHERTERM_FIRSTTIMEOUT             = $00000004;
  740.   LINEGATHERTERM_INTERTIMEOUT             = $00000008;
  741.   LINEGATHERTERM_CANCEL                   = $00000010;
  742.  
  743.   LINEGENERATETERM_DONE                   = $00000001;
  744.   LINEGENERATETERM_CANCEL                 = $00000002;
  745.  
  746. {$IFDEF Tapi_Ver20_ORGREATER}
  747. (*
  748. // These constants are mutually exclusive - there's no way to specify more
  749. // than one at a time (and it doesn't make sense, either) so they're
  750. // ordinal rather than bits.
  751. *)
  752.   LINEINITIALIZEEXOPTION_USEHIDDENWINDOW      = $00000001; {// TAPI v2.0}
  753.   LINEINITIALIZEEXOPTION_USEEVENT             = $00000002; {// TAPI v2.0}
  754.   LINEINITIALIZEEXOPTION_USECOMPLETIONPORT    = $00000003; {// TAPI v2.0}
  755. {$ENDIF}
  756.  
  757.   LINELOCATIONOPTION_PULSEDIAL            = $00000001;     {// TAPI v1.4}
  758.  
  759.   LINEMAPPER                              = $FFFFFFFF;
  760.  
  761.   LINEMEDIACONTROL_NONE                   = $00000001;
  762.   LINEMEDIACONTROL_START                  = $00000002;
  763.   LINEMEDIACONTROL_RESET                  = $00000004;
  764.   LINEMEDIACONTROL_PAUSE                  = $00000008;
  765.   LINEMEDIACONTROL_RESUME                 = $00000010;
  766.   LINEMEDIACONTROL_RATEUP                 = $00000020;
  767.   LINEMEDIACONTROL_RATEDOWN               = $00000040;
  768.   LINEMEDIACONTROL_RATENORMAL             = $00000080;
  769.   LINEMEDIACONTROL_VOLUMEUP               = $00000100;
  770.   LINEMEDIACONTROL_VOLUMEDOWN             = $00000200;
  771.   LINEMEDIACONTROL_VOLUMENORMAL           = $00000400;
  772.  
  773.   LINEMEDIAMODE_UNKNOWN                   = $00000002;
  774.   LINEMEDIAMODE_INTERACTIVEVOICE          = $00000004;
  775.   LINEMEDIAMODE_AUTOMATEDVOICE            = $00000008;
  776.   LINEMEDIAMODE_DATAMODEM                 = $00000010;
  777.   LINEMEDIAMODE_G3FAX                     = $00000020;
  778.   LINEMEDIAMODE_TDD                       = $00000040;
  779.   LINEMEDIAMODE_G4FAX                     = $00000080;
  780.   LINEMEDIAMODE_DIGITALDATA               = $00000100;
  781.   LINEMEDIAMODE_TELETEX                   = $00000200;
  782.   LINEMEDIAMODE_VIDEOTEX                  = $00000400;
  783.   LINEMEDIAMODE_TELEX                     = $00000800;
  784.   LINEMEDIAMODE_MIXED                     = $00001000;
  785.   LINEMEDIAMODE_ADSI                      = $00002000;
  786.   LINEMEDIAMODE_VOICEVIEW                 = $00004000;     {// TAPI v1.4}
  787. {$IFDEF Tapi_Ver20_ORGREATER}
  788.   LINEMEDIAMODE_VIDEO                     = $00008000;     {// TAPI v2.1}
  789. {$ENDIF}
  790.   LAST_LINEMEDIAMODE                      = $00008000;
  791.  
  792.   LINEOFFERINGMODE_ACTIVE                 = $00000001;     {// TAPI v1.4}
  793.   LINEOFFERINGMODE_INACTIVE               = $00000002;     {// TAPI v1.4}
  794.  
  795. {$IFDEF Tapi_Ver20_ORGREATER}
  796.   LINEOPENOPTION_SINGLEADDRESS            = $80000000;     {// TAPI v2.0}
  797.   LINEOPENOPTION_PROXY                    = $40000000;     {// TAPI v2.0}
  798. {$ENDIF}
  799.  
  800.   LINEPARKMODE_DIRECTED                   = $00000001;
  801.   LINEPARKMODE_NONDIRECTED                = $00000002;
  802.  
  803. {$IFDEF Tapi_Ver20_ORGREATER}
  804.   LINEPROXYREQUEST_SETAGENTGROUP          = $00000001;     {// TAPI v2.0}
  805.   LINEPROXYREQUEST_SETAGENTSTATE          = $00000002;     {// TAPI v2.0}
  806.   LINEPROXYREQUEST_SETAGENTACTIVITY       = $00000003;     {// TAPI v2.0}
  807.   LINEPROXYREQUEST_GETAGENTCAPS           = $00000004;     {// TAPI v2.0}
  808.   LINEPROXYREQUEST_GETAGENTSTATUS         = $00000005;     {// TAPI v2.0}
  809.   LINEPROXYREQUEST_AGENTSPECIFIC          = $00000006;     {// TAPI v2.0}
  810.   LINEPROXYREQUEST_GETAGENTACTIVITYLIST   = $00000007;     {// TAPI v2.0}
  811.   LINEPROXYREQUEST_GETAGENTGROUPLIST      = $00000008;     {// TAPI v2.0}
  812. {$ENDIF}
  813.  
  814.   LINEREMOVEFROMCONF_NONE                 = $00000001;
  815.   LINEREMOVEFROMCONF_LAST                 = $00000002;
  816.   LINEREMOVEFROMCONF_ANY                  = $00000003;
  817.  
  818.   LINEREQUESTMODE_MAKECALL                = $00000001;
  819.   LINEREQUESTMODE_MEDIACALL               = $00000002;
  820.   LINEREQUESTMODE_DROP                    = $00000004;
  821.   LAST_LINEREQUESTMODE                    = LINEREQUESTMODE_MEDIACALL;
  822.  
  823.   LINEROAMMODE_UNKNOWN                    = $00000001;
  824.   LINEROAMMODE_UNAVAIL                    = $00000002;
  825.   LINEROAMMODE_HOME                       = $00000004;
  826.   LINEROAMMODE_ROAMA                      = $00000008;
  827.   LINEROAMMODE_ROAMB                      = $00000010;
  828.  
  829.   LINESPECIALINFO_NOCIRCUIT               = $00000001;
  830.   LINESPECIALINFO_CUSTIRREG               = $00000002;
  831.   LINESPECIALINFO_REORDER                 = $00000004;
  832.   LINESPECIALINFO_UNKNOWN                 = $00000008;
  833.   LINESPECIALINFO_UNAVAIL                 = $00000010;
  834.  
  835.   LINETERMDEV_PHONE                       = $00000001;
  836.   LINETERMDEV_HEADSET                     = $00000002;
  837.   LINETERMDEV_SPEAKER                     = $00000004;
  838.  
  839.   LINETERMMODE_BUTTONS                    = $00000001;
  840.   LINETERMMODE_LAMPS                      = $00000002;
  841.   LINETERMMODE_DISPLAY                    = $00000004;
  842.   LINETERMMODE_RINGER                     = $00000008;
  843.   LINETERMMODE_HOOKSWITCH                 = $00000010;
  844.   LINETERMMODE_MEDIATOLINE                = $00000020;
  845.   LINETERMMODE_MEDIAFROMLINE              = $00000040;
  846.   LINETERMMODE_MEDIABIDIRECT              = $00000080;
  847.  
  848.   LINETERMSHARING_PRIVATE                 = $00000001;
  849.   LINETERMSHARING_SHAREDEXCL              = $00000002;
  850.   LINETERMSHARING_SHAREDCONF              = $00000004;
  851.  
  852.   LINETOLLLISTOPTION_ADD                  = $00000001;
  853.   LINETOLLLISTOPTION_REMOVE               = $00000002;
  854.  
  855.   LINETONEMODE_CUSTOM                     = $00000001;
  856.   LINETONEMODE_RINGBACK                   = $00000002;
  857.   LINETONEMODE_BUSY                       = $00000004;
  858.   LINETONEMODE_BEEP                       = $00000008;
  859.   LINETONEMODE_BILLING                    = $00000010;
  860.  
  861.   LINETRANSFERMODE_TRANSFER               = $00000001;
  862.   LINETRANSFERMODE_CONFERENCE             = $00000002;
  863.  
  864.   LINETRANSLATEOPTION_CARDOVERRIDE        = $00000001;
  865.   LINETRANSLATEOPTION_CANCELCALLWAITING   = $00000002;     {// TAPI v1.4}
  866.   LINETRANSLATEOPTION_FORCELOCAL          = $00000004;     {// TAPI v1.4}
  867.   LINETRANSLATEOPTION_FORCELD             = $00000008;     {// TAPI v1.4}
  868.  
  869.   LINETRANSLATERESULT_CANONICAL           = $00000001;
  870.   LINETRANSLATERESULT_INTERNATIONAL       = $00000002;
  871.   LINETRANSLATERESULT_LONGDISTANCE        = $00000004;
  872.   LINETRANSLATERESULT_LOCAL               = $00000008;
  873.   LINETRANSLATERESULT_INTOLLLIST          = $00000010;
  874.   LINETRANSLATERESULT_NOTINTOLLLIST       = $00000020;
  875.   LINETRANSLATERESULT_DIALBILLING         = $00000040;
  876.   LINETRANSLATERESULT_DIALQUIET           = $00000080;
  877.   LINETRANSLATERESULT_DIALDIALTONE        = $00000100;
  878.   LINETRANSLATERESULT_DIALPROMPT          = $00000200;
  879. {$IFDEF Tapi_Ver20_ORGREATER}
  880.   LINETRANSLATERESULT_VOICEDETECT         = $00000400;     {// TAPI v2.0}
  881. {$ENDIF}
  882.  
  883.   PHONEBUTTONFUNCTION_UNKNOWN             = $00000000;
  884.   PHONEBUTTONFUNCTION_CONFERENCE          = $00000001;
  885.   PHONEBUTTONFUNCTION_TRANSFER            = $00000002;
  886.   PHONEBUTTONFUNCTION_DROP                = $00000003;
  887.   PHONEBUTTONFUNCTION_HOLD                = $00000004;
  888.   PHONEBUTTONFUNCTION_RECALL              = $00000005;
  889.   PHONEBUTTONFUNCTION_DISCONNECT          = $00000006;
  890.   PHONEBUTTONFUNCTION_CONNECT             = $00000007;
  891.   PHONEBUTTONFUNCTION_MSGWAITON           = $00000008;
  892.   PHONEBUTTONFUNCTION_MSGWAITOFF          = $00000009;
  893.   PHONEBUTTONFUNCTION_SELECTRING          = $0000000A;
  894.   PHONEBUTTONFUNCTION_ABBREVDIAL          = $0000000B;
  895.   PHONEBUTTONFUNCTION_FORWARD             = $0000000C;
  896.   PHONEBUTTONFUNCTION_PICKUP              = $0000000D;
  897.   PHONEBUTTONFUNCTION_RINGAGAIN           = $0000000E;
  898.   PHONEBUTTONFUNCTION_PARK                = $0000000F;
  899.   PHONEBUTTONFUNCTION_REJECT              = $00000010;
  900.   PHONEBUTTONFUNCTION_REDIRECT            = $00000011;
  901.   PHONEBUTTONFUNCTION_MUTE                = $00000012;
  902.   PHONEBUTTONFUNCTION_VOLUMEUP            = $00000013;
  903.   PHONEBUTTONFUNCTION_VOLUMEDOWN          = $00000014;
  904.   PHONEBUTTONFUNCTION_SPEAKERON           = $00000015;
  905.   PHONEBUTTONFUNCTION_SPEAKEROFF          = $00000016;
  906.   PHONEBUTTONFUNCTION_FLASH               = $00000017;
  907.   PHONEBUTTONFUNCTION_DATAON              = $00000018;
  908.   PHONEBUTTONFUNCTION_DATAOFF             = $00000019;
  909.   PHONEBUTTONFUNCTION_DONOTDISTURB        = $0000001A;
  910.   PHONEBUTTONFUNCTION_INTERCOM            = $0000001B;
  911.   PHONEBUTTONFUNCTION_BRIDGEDAPP          = $0000001C;
  912.   PHONEBUTTONFUNCTION_BUSY                = $0000001D;
  913.   PHONEBUTTONFUNCTION_CALLAPP             = $0000001E;
  914.   PHONEBUTTONFUNCTION_DATETIME            = $0000001F;
  915.   PHONEBUTTONFUNCTION_DIRECTORY           = $00000020;
  916.   PHONEBUTTONFUNCTION_COVER               = $00000021;
  917.   PHONEBUTTONFUNCTION_CALLID              = $00000022;
  918.   PHONEBUTTONFUNCTION_LASTNUM             = $00000023;
  919.   PHONEBUTTONFUNCTION_NIGHTSRV            = $00000024;
  920.   PHONEBUTTONFUNCTION_SENDCALLS           = $00000025;
  921.   PHONEBUTTONFUNCTION_MSGINDICATOR        = $00000026;
  922.   PHONEBUTTONFUNCTION_REPDIAL             = $00000027;
  923.   PHONEBUTTONFUNCTION_SETREPDIAL          = $00000028;
  924.   PHONEBUTTONFUNCTION_SYSTEMSPEED         = $00000029;
  925.   PHONEBUTTONFUNCTION_STATIONSPEED        = $0000002A;
  926.   PHONEBUTTONFUNCTION_CAMPON              = $0000002B;
  927.   PHONEBUTTONFUNCTION_SAVEREPEAT          = $0000002C;
  928.   PHONEBUTTONFUNCTION_QUEUECALL           = $0000002D;
  929.   PHONEBUTTONFUNCTION_NONE                = $0000002E;
  930.  
  931.   PHONEBUTTONMODE_DUMMY                   = $00000001;
  932.   PHONEBUTTONMODE_CALL                    = $00000002;
  933.   PHONEBUTTONMODE_FEATURE                 = $00000004;
  934.   PHONEBUTTONMODE_KEYPAD                  = $00000008;
  935.   PHONEBUTTONMODE_LOCAL                   = $00000010;
  936.   PHONEBUTTONMODE_DISPLAY                 = $00000020;
  937.  
  938.   PHONEBUTTONSTATE_UP                     = $00000001;
  939.   PHONEBUTTONSTATE_DOWN                   = $00000002;
  940.   PHONEBUTTONSTATE_UNKNOWN                = $00000004;     {// TAPI v1.4}
  941.   PHONEBUTTONSTATE_UNAVAIL                = $00000008;     {// TAPI v1.4}
  942.  
  943.   PHONEERR_ALLOCATED                      = $90000001;
  944.   PHONEERR_BADDEVICEID                    = $90000002;
  945.   PHONEERR_INCOMPATIBLEAPIVERSION         = $90000003;
  946.   PHONEERR_INCOMPATIBLEEXTVERSION         = $90000004;
  947.   PHONEERR_INIFILECORRUPT                 = $90000005;
  948.   PHONEERR_INUSE                          = $90000006;
  949.   PHONEERR_INVALAPPHANDLE                 = $90000007;
  950.   PHONEERR_INVALAPPNAME                   = $90000008;
  951.   PHONEERR_INVALBUTTONLAMPID              = $90000009;
  952.   PHONEERR_INVALBUTTONMODE                = $9000000A;
  953.   PHONEERR_INVALBUTTONSTATE               = $9000000B;
  954.   PHONEERR_INVALDATAID                    = $9000000C;
  955.   PHONEERR_INVALDEVICECLASS               = $9000000D;
  956.   PHONEERR_INVALEXTVERSION                = $9000000E;
  957.   PHONEERR_INVALHOOKSWITCHDEV             = $9000000F;
  958.   PHONEERR_INVALHOOKSWITCHMODE            = $90000010;
  959.   PHONEERR_INVALLAMPMODE                  = $90000011;
  960.   PHONEERR_INVALPARAM                     = $90000012;
  961.   PHONEERR_INVALPHONEHANDLE               = $90000013;
  962.   PHONEERR_INVALPHONESTATE                = $90000014;
  963.   PHONEERR_INVALPOINTER                   = $90000015;
  964.   PHONEERR_INVALPRIVILEGE                 = $90000016;
  965.   PHONEERR_INVALRINGMODE                  = $90000017;
  966.   PHONEERR_NODEVICE                       = $90000018;
  967.   PHONEERR_NODRIVER                       = $90000019;
  968.   PHONEERR_NOMEM                          = $9000001A;
  969.   PHONEERR_NOTOWNER                       = $9000001B;
  970.   PHONEERR_OPERATIONFAILED                = $9000001C;
  971.   PHONEERR_OPERATIONUNAVAIL               = $9000001D;
  972.   PHONEERR_RESOURCEUNAVAIL                = $9000001F;
  973.   PHONEERR_REQUESTOVERRUN                 = $90000020;
  974.   PHONEERR_STRUCTURETOOSMALL              = $90000021;
  975.   PHONEERR_UNINITIALIZED                  = $90000022;
  976.   PHONEERR_REINIT                         = $90000023;
  977.  
  978.  
  979. {$IFDEF Tapi_Ver20_ORGREATER}
  980.   PHONEFEATURE_GETBUTTONINFO              = $00000001;     {// TAPI v2.0}
  981.   PHONEFEATURE_GETDATA                    = $00000002;     {// TAPI v2.0}
  982.   PHONEFEATURE_GETDISPLAY                 = $00000004;     {// TAPI v2.0}
  983.   PHONEFEATURE_GETGAINHANDSET             = $00000008;     {// TAPI v2.0}
  984.   PHONEFEATURE_GETGAINSPEAKER             = $00000010;     {// TAPI v2.0}
  985.   PHONEFEATURE_GETGAINHEADSET             = $00000020;     {// TAPI v2.0}
  986.   PHONEFEATURE_GETHOOKSWITCHHANDSET       = $00000040;     {// TAPI v2.0}
  987.   PHONEFEATURE_GETHOOKSWITCHSPEAKER       = $00000080;     {// TAPI v2.0}
  988.   PHONEFEATURE_GETHOOKSWITCHHEADSET       = $00000100;     {// TAPI v2.0}
  989.   PHONEFEATURE_GETLAMP                    = $00000200;     {// TAPI v2.0}
  990.   PHONEFEATURE_GETRING                    = $00000400;     {// TAPI v2.0}
  991.   PHONEFEATURE_GETVOLUMEHANDSET           = $00000800;     {// TAPI v2.0}
  992.   PHONEFEATURE_GETVOLUMESPEAKER           = $00001000;     {// TAPI v2.0}
  993.   PHONEFEATURE_GETVOLUMEHEADSET           = $00002000;     {// TAPI v2.0}
  994.   PHONEFEATURE_SETBUTTONINFO              = $00004000;     {// TAPI v2.0}
  995.   PHONEFEATURE_SETDATA                    = $00008000;     {// TAPI v2.0}
  996.   PHONEFEATURE_SETDISPLAY                 = $00010000;     {// TAPI v2.0}
  997.   PHONEFEATURE_SETGAINHANDSET             = $00020000;     {// TAPI v2.0}
  998.   PHONEFEATURE_SETGAINSPEAKER             = $00040000;     {// TAPI v2.0}
  999.   PHONEFEATURE_SETGAINHEADSET             = $00080000;     {// TAPI v2.0}
  1000.   PHONEFEATURE_SETHOOKSWITCHHANDSET       = $00100000;     {// TAPI v2.0}
  1001.   PHONEFEATURE_SETHOOKSWITCHSPEAKER       = $00200000;     {// TAPI v2.0}
  1002.   PHONEFEATURE_SETHOOKSWITCHHEADSET       = $00400000;     {// TAPI v2.0}
  1003.   PHONEFEATURE_SETLAMP                    = $00800000;     {// TAPI v2.0}
  1004.   PHONEFEATURE_SETRING                    = $01000000;     {// TAPI v2.0}
  1005.   PHONEFEATURE_SETVOLUMEHANDSET           = $02000000;     {// TAPI v2.0}
  1006.   PHONEFEATURE_SETVOLUMESPEAKER           = $04000000;     {// TAPI v2.0}
  1007.   PHONEFEATURE_SETVOLUMEHEADSET           = $08000000;     {// TAPI v2.0}
  1008. {$ENDIF}
  1009.  
  1010.   PHONEHOOKSWITCHDEV_HANDSET              = $00000001;
  1011.   PHONEHOOKSWITCHDEV_SPEAKER              = $00000002;
  1012.   PHONEHOOKSWITCHDEV_HEADSET              = $00000004;
  1013.  
  1014.   PHONEHOOKSWITCHMODE_ONHOOK              = $00000001;
  1015.   PHONEHOOKSWITCHMODE_MIC                 = $00000002;
  1016.   PHONEHOOKSWITCHMODE_SPEAKER             = $00000004;
  1017.   PHONEHOOKSWITCHMODE_MICSPEAKER          = $00000008;
  1018.   PHONEHOOKSWITCHMODE_UNKNOWN             = $00000010;
  1019.  
  1020. {$IFDEF Tapi_Ver20_ORGREATER}
  1021.   PHONEINITIALIZEEXOPTION_USEHIDDENWINDOW     = $00000001;  {// TAPI v2.0}
  1022.   PHONEINITIALIZEEXOPTION_USEEVENT            = $00000002;  {// TAPI v2.0}
  1023.   PHONEINITIALIZEEXOPTION_USECOMPLETIONPORT   = $00000003;  {// TAPI v2.0}
  1024. {$ENDIF}
  1025.  
  1026.   PHONELAMPMODE_DUMMY                     = $00000001;
  1027.   PHONELAMPMODE_OFF                       = $00000002;
  1028.   PHONELAMPMODE_STEADY                    = $00000004;
  1029.   PHONELAMPMODE_WINK                      = $00000008;
  1030.   PHONELAMPMODE_FLASH                     = $00000010;
  1031.   PHONELAMPMODE_FLUTTER                   = $00000020;
  1032.   PHONELAMPMODE_BROKENFLUTTER             = $00000040;
  1033.   PHONELAMPMODE_UNKNOWN                   = $00000080;
  1034.  
  1035.   PHONEPRIVILEGE_MONITOR                  = $00000001;
  1036.   PHONEPRIVILEGE_OWNER                    = $00000002;
  1037.  
  1038.   PHONESTATE_OTHER                        = $00000001;
  1039.   PHONESTATE_CONNECTED                    = $00000002;
  1040.   PHONESTATE_DISCONNECTED                 = $00000004;
  1041.   PHONESTATE_OWNER                        = $00000008;
  1042.   PHONESTATE_MONITORS                     = $00000010;
  1043.   PHONESTATE_DISPLAY                      = $00000020;
  1044.   PHONESTATE_LAMP                         = $00000040;
  1045.   PHONESTATE_RINGMODE                     = $00000080;
  1046.   PHONESTATE_RINGVOLUME                   = $00000100;
  1047.   PHONESTATE_HANDSETHOOKSWITCH            = $00000200;
  1048.   PHONESTATE_HANDSETVOLUME                = $00000400;
  1049.   PHONESTATE_HANDSETGAIN                  = $00000800;
  1050.   PHONESTATE_SPEAKERHOOKSWITCH            = $00001000;
  1051.   PHONESTATE_SPEAKERVOLUME                = $00002000;
  1052.   PHONESTATE_SPEAKERGAIN                  = $00004000;
  1053.   PHONESTATE_HEADSETHOOKSWITCH            = $00008000;
  1054.   PHONESTATE_HEADSETVOLUME                = $00010000;
  1055.   PHONESTATE_HEADSETGAIN                  = $00020000;
  1056.   PHONESTATE_SUSPEND                      = $00040000;
  1057.   PHONESTATE_RESUME                       = $00080000;
  1058.   PHONESTATE_DEVSPECIFIC                  = $00100000;
  1059.   PHONESTATE_REINIT                       = $00200000;
  1060.   PHONESTATE_CAPSCHANGE                   = $00400000;     {// TAPI v1.4}
  1061.   PHONESTATE_REMOVED                      = $00800000;     {// TAPI v1.4}
  1062.  
  1063.   PHONESTATUSFLAGS_CONNECTED              = $00000001;
  1064.   PHONESTATUSFLAGS_SUSPENDED              = $00000002;
  1065.  
  1066.   STRINGFORMAT_ASCII                      = $00000001;
  1067.   STRINGFORMAT_DBCS                       = $00000002;
  1068.   STRINGFORMAT_UNICODE                    = $00000003;
  1069.   STRINGFORMAT_BINARY                     = $00000004;
  1070.  
  1071.   TAPI_REPLY                              = WM_USER + 99;
  1072.  
  1073.   TAPIERR_CONNECTED                       = 0;
  1074.   TAPIERR_DROPPED                         = -1;
  1075.   TAPIERR_NOREQUESTRECIPIENT              = -2;
  1076.   TAPIERR_REQUESTQUEUEFULL                = -3;
  1077.   TAPIERR_INVALDESTADDRESS                = -4;
  1078.   TAPIERR_INVALWINDOWHANDLE               = -5;
  1079.   TAPIERR_INVALDEVICECLASS                = -6;
  1080.   TAPIERR_INVALDEVICEID                   = -7;
  1081.   TAPIERR_DEVICECLASSUNAVAIL              = -8;
  1082.   TAPIERR_DEVICEIDUNAVAIL                 = -9;
  1083.   TAPIERR_DEVICEINUSE                     = -10;
  1084.   TAPIERR_DESTBUSY                        = -11;
  1085.   TAPIERR_DESTNOANSWER                    = -12;
  1086.   TAPIERR_DESTUNAVAIL                     = -13;
  1087.   TAPIERR_UNKNOWNWINHANDLE                = -14;
  1088.   TAPIERR_UNKNOWNREQUESTID                = -15;
  1089.   TAPIERR_REQUESTFAILED                   = -16;
  1090.   TAPIERR_REQUESTCANCELLED                = -17;
  1091.   TAPIERR_INVALPOINTER                    = -18;
  1092.  
  1093.  
  1094.   TAPIMAXDESTADDRESSSIZE                  = 80;
  1095.   TAPIMAXAPPNAMESIZE                      = 40;
  1096.   TAPIMAXCALLEDPARTYSIZE                  = 40;
  1097.   TAPIMAXCOMMENTSIZE                      = 80;
  1098.   TAPIMAXDEVICECLASSSIZE                  = 40;
  1099.   TAPIMAXDEVICEIDSIZE                     = 40;
  1100.  
  1101.  
  1102. type
  1103.   LPLINEADDRESSCAPS = ^TLINEADDRESSCAPS;
  1104.   PLINEADDRESSCAPS = ^TLINEADDRESSCAPS;
  1105.   TLINEADDRESSCAPS =
  1106.     record
  1107.       dwTotalSize,
  1108.       dwNeededSize,
  1109.       dwUsedSize,
  1110.       dwLineDeviceID,
  1111.       dwAddressSize,
  1112.       dwAddressOffset,
  1113.       dwDevSpecificSize,
  1114.       dwDevSpecificOffset,
  1115.       dwAddressSharing,
  1116.       dwAddressStates,
  1117.       dwCallInfoStates,
  1118.       dwCallerIDFlags,
  1119.       dwCalledIDFlags,
  1120.       dwConnectedIDFlags,
  1121.       dwRedirectionIDFlags,
  1122.       dwRedirectingIDFlags,
  1123.       dwCallStates,
  1124.       dwDialToneModes,
  1125.       dwBusyModes,
  1126.       dwSpecialInfo,
  1127.       dwDisconnectModes,
  1128.       dwMaxNumActiveCalls,
  1129.       dwMaxNumOnHoldCalls,
  1130.       dwMaxNumOnHoldPendingCalls,
  1131.       dwMaxNumConference,
  1132.       dwMaxNumTransConf,
  1133.       dwAddrCapFlags,
  1134.       dwCallFeatures,
  1135.       dwRemoveFromConfCaps,
  1136.       dwRemoveFromConfState,
  1137.       dwTransferModes,
  1138.       dwParkModes,
  1139.       dwForwardModes,
  1140.       dwMaxForwardEntries,
  1141.       dwMaxSpecificEntries,
  1142.       dwMinFwdNumRings,
  1143.       dwMaxFwdNumRings,
  1144.       dwMaxCallCompletions,
  1145.       dwCallCompletionConds,
  1146.       dwCallCompletionModes,
  1147.       dwNumCompletionMessages,
  1148.       dwCompletionMsgTextEntrySize,
  1149.       dwCompletionMsgTextSize,
  1150.       dwCompletionMsgTextOffset,
  1151.  
  1152.       dwAddressFeatures: DWORD;                            {// TAPI v1.4}
  1153.  
  1154. {$IFDEF Tapi_Ver20_ORGREATER}
  1155.       dwPredictiveAutoTransferStates,                      {// TAPI v2.0}
  1156.       dwNumCallTreatments,                                 {// TAPI v2.0}
  1157.       dwCallTreatmentListSize,                             {// TAPI v2.0}
  1158.       dwCallTreatmentListOffset,                           {// TAPI v2.0}
  1159.       dwDeviceClassesSize,                                 {// TAPI v2.0}
  1160.       dwDeviceClassesOffset,                               {// TAPI v2.0}
  1161.       dwMaxCallDataSize,                                   {// TAPI v2.0}
  1162.       dwCallFeatures2,                                     {// TAPI v2.0}
  1163.       dwMaxNoAnswerTimeout,                                {// TAPI v2.0}
  1164.       dwConnectedModes,                                    {// TAPI v2.0}
  1165.       dwOfferingModes,                                     {// TAPI v2.0}
  1166.       dwAvailableMediaModes: DWORD;                        {// TAPI v2.0}
  1167. {$ENDIF}
  1168.     end;
  1169.  
  1170.   LPLINEADDRESSSTATUS = ^TLINEADDRESSSTATUS;
  1171.   PLINEADDRESSSTATUS = ^TLINEADDRESSSTATUS;
  1172.   TLINEADDRESSSTATUS =
  1173.     record
  1174.       dwTotalSize,
  1175.       dwNeededSize,
  1176.       dwUsedSize,
  1177.       dwNumInUse,
  1178.       dwNumActiveCalls,
  1179.       dwNumOnHoldCalls,
  1180.       dwNumOnHoldPendCalls,
  1181.       dwAddressFeatures,
  1182.       dwNumRingsNoAnswer,
  1183.       dwForwardNumEntries,
  1184.       dwForwardSize,
  1185.       dwForwardOffset,
  1186.       dwTerminalModesSize,
  1187.       dwTerminalModesOffset,
  1188.       dwDevSpecificSize,
  1189.       dwDevSpecificOffset: DWORD;
  1190.     end;
  1191.  
  1192. {$IFDEF Tapi_Ver20_ORGREATER}
  1193.   LPLINEAGENTACTIVITYENTRY = ^TLINEAGENTACTIVITYENTRY;
  1194.   PLINEAGENTACTIVITYENTRY = ^TLINEAGENTACTIVITYENTRY;
  1195.   TLINEAGENTACTIVITYENTRY =
  1196.     record
  1197.       dwID,                                                {// TAPI v2.0}
  1198.       dwNameSize,                                          {// TAPI v2.0}
  1199.       dwNameOffset: DWORD;                                 {// TAPI v2.0}
  1200.     end;
  1201.  
  1202.   LPLINEAGENTACTIVITYLIST = ^TLINEAGENTACTIVITYLIST;
  1203.   PLINEAGENTACTIVITYLIST = ^TLINEAGENTACTIVITYLIST;
  1204.   TLINEAGENTACTIVITYLIST =
  1205.     record
  1206.       dwTotalSize,                                         {// TAPI v2.0}
  1207.       dwNeededSize,                                        {// TAPI v2.0}
  1208.       dwUsedSize,                                          {// TAPI v2.0}
  1209.       dwNumEntries,                                        {// TAPI v2.0}
  1210.       dwListSize,                                          {// TAPI v2.0}
  1211.       dwListOffset: DWORD;                                 {// TAPI v2.0}
  1212.     end;
  1213.  
  1214.   LPLINEAGENTCAPS = ^TLINEAGENTCAPS;
  1215.   PLINEAGENTCAPS = ^TLINEAGENTCAPS;
  1216.   TLINEAGENTCAPS =
  1217.     record
  1218.       dwTotalSize,                                         {// TAPI v2.0}
  1219.       dwNeededSize,                                        {// TAPI v2.0}
  1220.       dwUsedSize,                                          {// TAPI v2.0}
  1221.       dwAgentHandlerInfoSize,                              {// TAPI v2.0}
  1222.       dwAgentHandlerInfoOffset,                            {// TAPI v2.0}
  1223.       dwCapsVersion,                                       {// TAPI v2.0}
  1224.       dwFeatures,                                          {// TAPI v2.0}
  1225.       dwStates,                                            {// TAPI v2.0}
  1226.       dwNextStates,                                        {// TAPI v2.0}
  1227.       dwMaxNumGroupEntries,                                {// TAPI v2.0}
  1228.       dwAgentStatusMessages,                               {// TAPI v2.0}
  1229.       dwNumAgentExtensionIDs,                              {// TAPI v2.0}
  1230.       dwAgentExtensionIDListSize,                          {// TAPI v2.0}
  1231.       dwAgentExtensionIDListOffset: DWORD;                 {// TAPI v2.0}
  1232.     end;
  1233.  
  1234.   LPLINEAGENTGROUPENTRY = ^TLINEAGENTGROUPENTRY;
  1235.   PLINEAGENTGROUPENTRY = ^TLINEAGENTGROUPENTRY;
  1236.   TLINEAGENTGROUPENTRY =
  1237.     record
  1238.       GroupID :
  1239.         record
  1240.           dwGroupID1,                                      {// TAPI v2.0}
  1241.           dwGroupID2,                                      {// TAPI v2.0}
  1242.           dwGroupID3,                                      {// TAPI v2.0}
  1243.           dwGroupID4: DWORD;                               {// TAPI v2.0}
  1244.         end;
  1245.       dwNameSize,                                          {// TAPI v2.0}
  1246.       dwNameOffset: DWORD;                                 {// TAPI v2.0}
  1247.     end;
  1248.  
  1249.   LPLINEAGENTGROUPLIST = ^TLINEAGENTGROUPLIST;
  1250.   PLINEAGENTGROUPLIST = ^TLINEAGENTGROUPLIST;
  1251.   TLINEAGENTGROUPLIST =
  1252.     record
  1253.       dwTotalSize,                                         {// TAPI v2.0}
  1254.       dwNeededSize,                                        {// TAPI v2.0}
  1255.       dwUsedSize,                                          {// TAPI v2.0}
  1256.       dwNumEntries,                                        {// TAPI v2.0}
  1257.       dwListSize,                                          {// TAPI v2.0}
  1258.       dwListOffset: DWORD;                                 {// TAPI v2.0}
  1259.     end;
  1260.  
  1261.   LPLINEAGENTSTATUS = ^TLINEAGENTSTATUS;
  1262.   PLINEAGENTSTATUS = ^TLINEAGENTSTATUS;
  1263.   TLINEAGENTSTATUS =
  1264.     record
  1265.       dwTotalSize,                                         {// TAPI v2.0}
  1266.       dwNeededSize,                                        {// TAPI v2.0}
  1267.       dwUsedSize,                                          {// TAPI v2.0}
  1268.       dwNumEntries,                                        {// TAPI v2.0}
  1269.       dwGroupListSize,                                     {// TAPI v2.0}
  1270.       dwGroupListOffset,                                   {// TAPI v2.0}
  1271.       dwState,                                             {// TAPI v2.0}
  1272.       dwNextState,                                         {// TAPI v2.0}
  1273.       dwActivityID,                                        {// TAPI v2.0}
  1274.       dwActivitySize,                                      {// TAPI v2.0}
  1275.       dwActivityOffset,                                    {// TAPI v2.0}
  1276.       dwAgentFeatures,                                     {// TAPI v2.0}
  1277.       dwValidStates,                                       {// TAPI v2.0}
  1278.       dwValidNextStates: DWORD;                            {// TAPI v2.0}
  1279.     end;
  1280.  
  1281.   LPLINEAPPINFO = ^TLINEAPPINFO;
  1282.   PLINEAPPINFO = ^TLINEAPPINFO;
  1283.   TLINEAPPINFO =
  1284.     record
  1285.       dwMachineNameSize,                                   {// TAPI v2.0}
  1286.       dwMachineNameOffset,                                 {// TAPI v2.0}
  1287.       dwUserNameSize,                                      {// TAPI v2.0}
  1288.       dwUserNameOffset,                                    {// TAPI v2.0}
  1289.       dwModuleFilenameSize,                                {// TAPI v2.0}
  1290.       dwModuleFilenameOffset,                              {// TAPI v2.0}
  1291.       dwFriendlyNameSize,                                  {// TAPI v2.0}
  1292.       dwFriendlyNameOffset,                                {// TAPI v2.0}
  1293.       dwMediaModes,                                        {// TAPI v2.0}
  1294.       dwAddressID: DWORD;                                  {// TAPI v2.0}
  1295.     end;
  1296. {$ENDIF}
  1297.  
  1298.   LPLINEDIALPARAMS = ^TLINEDIALPARAMS;
  1299.   PLINEDIALPARAMS = ^TLINEDIALPARAMS;
  1300.   TLINEDIALPARAMS =
  1301.     record
  1302.       dwDialPause,
  1303.       dwDialSpeed,
  1304.       dwDigitDuration,
  1305.       dwWaitForDialtone: DWORD;
  1306.     end;
  1307.  
  1308.   LPLINECALLINFO = ^TLINECALLINFO;
  1309.   PLINECALLINFO = ^TLINECALLINFO;
  1310.   TLINECALLINFO =
  1311.     record
  1312.       dwTotalSize,
  1313.       dwNeededSize,
  1314.       dwUsedSize: DWORD;
  1315.       hLine: HLINE;
  1316.       dwLineDeviceID,
  1317.       dwAddressID,
  1318.       dwBearerMode,
  1319.       dwRate,
  1320.       dwMediaMode,
  1321.       dwAppSpecific,
  1322.       dwCallID,
  1323.       dwRelatedCallID,
  1324.       dwCallParamFlags,
  1325.       dwCallStates,
  1326.       dwMonitorDigitModes,
  1327.       dwMonitorMediaModes: DWORD;
  1328.       DialParams: TLINEDIALPARAMS;
  1329.       dwOrigin,
  1330.       dwReason,
  1331.       dwCompletionID,
  1332.       dwNumOwners,
  1333.       dwNumMonitors,
  1334.       dwCountryCode,
  1335.       dwTrunk,
  1336.       dwCallerIDFlags,
  1337.       dwCallerIDSize,
  1338.       dwCallerIDOffset,
  1339.       dwCallerIDNameSize,
  1340.       dwCallerIDNameOffset,
  1341.       dwCalledIDFlags,
  1342.       dwCalledIDSize,
  1343.       dwCalledIDOffset,
  1344.       dwCalledIDNameSize,
  1345.       dwCalledIDNameOffset,
  1346.       dwConnectedIDFlags,
  1347.       dwConnectedIDSize,
  1348.       dwConnectedIDOffset,
  1349.       dwConnectedIDNameSize,
  1350.       dwConnectedIDNameOffset,
  1351.       dwRedirectionIDFlags,
  1352.       dwRedirectionIDSize,
  1353.       dwRedirectionIDOffset,
  1354.       dwRedirectionIDNameSize,
  1355.       dwRedirectionIDNameOffset,
  1356.       dwRedirectingIDFlags,
  1357.       dwRedirectingIDSize,
  1358.       dwRedirectingIDOffset,
  1359.       dwRedirectingIDNameSize,
  1360.       dwRedirectingIDNameOffset,
  1361.       dwAppNameSize,
  1362.       dwAppNameOffset,
  1363.       dwDisplayableAddressSize,
  1364.       dwDisplayableAddressOffset,
  1365.       dwCalledPartySize,
  1366.       dwCalledPartyOffset,
  1367.       dwCommentSize,
  1368.       dwCommentOffset,
  1369.       dwDisplaySize,
  1370.       dwDisplayOffset,
  1371.       dwUserUserInfoSize,
  1372.       dwUserUserInfoOffset,
  1373.       dwHighLevelCompSize,
  1374.       dwHighLevelCompOffset,
  1375.       dwLowLevelCompSize,
  1376.       dwLowLevelCompOffset,
  1377.       dwChargingInfoSize,
  1378.       dwChargingInfoOffset,
  1379.       dwTerminalModesSize,
  1380.       dwTerminalModesOffset,
  1381.       dwDevSpecificSize,
  1382.       dwDevSpecificOffset: DWORD;
  1383.  
  1384. {$IFDEF Tapi_Ver20_ORGREATER}
  1385.       dwCallTreatment,                                     {// TAPI v2.0}
  1386.       dwCallDataSize,                                      {// TAPI v2.0}
  1387.       dwCallDataOffset,                                    {// TAPI v2.0}
  1388.       dwSendingFlowspecSize,                               {// TAPI v2.0}
  1389.       dwSendingFlowspecOffset,                             {// TAPI v2.0}
  1390.       dwReceivingFlowspecSize,                             {// TAPI v2.0}
  1391.       dwReceivingFlowspecOffset: DWORD;                    {// TAPI v2.0}
  1392. {$ENDIF}
  1393.     end;
  1394.  
  1395.   LPLINECALLLIST = ^TLINECALLLIST;
  1396.   PLINECALLLIST = ^TLINECALLLIST;
  1397.   TLINECALLLIST =
  1398.     record
  1399.       dwTotalSize,
  1400.       dwNeededSize,
  1401.       dwUsedSize,
  1402.       dwCallsNumEntries,
  1403.       dwCallsSize,
  1404.       dwCallsOffset: DWORD;
  1405.     end;
  1406.  
  1407.   LPLINECALLPARAMS = ^TLINECALLPARAMS;
  1408.   PLINECALLPARAMS = ^TLINECALLPARAMS;
  1409.   TLINECALLPARAMS =
  1410.     record                             {// Defaults:        }
  1411.       dwTotalSize,                     {// ---------        }
  1412.       dwBearerMode,                    {// voice            }
  1413.       dwMinRate,                       {// (3.1kHz)         }
  1414.       dwMaxRate,                       {// (3.1kHz)         }
  1415.       dwMediaMode,                     {// interactiveVoice }
  1416.       dwCallParamFlags,                {// 0                }
  1417.       dwAddressMode,                   {// addressID        }
  1418.       dwAddressID: DWORD;              {// (any available)  }
  1419.       DialParams: TLINEDIALPARAMS;     {// (0, 0, 0, 0)     }
  1420.       dwOrigAddressSize,               {// 0                }
  1421.       dwOrigAddressOffset,
  1422.       dwDisplayableAddressSize,
  1423.       dwDisplayableAddressOffset,
  1424.       dwCalledPartySize,               {// 0 }
  1425.       dwCalledPartyOffset,
  1426.       dwCommentSize,                   {// 0 }
  1427.       dwCommentOffset,
  1428.       dwUserUserInfoSize,              {// 0  }
  1429.       dwUserUserInfoOffset,
  1430.       dwHighLevelCompSize,             {// 0  }
  1431.       dwHighLevelCompOffset,
  1432.       dwLowLevelCompSize,              {// 0  }
  1433.       dwLowLevelCompOffset,
  1434.       dwDevSpecificSize,               {// 0  }
  1435.       dwDevSpecificOffset: DWORD;
  1436.  
  1437. {$IFDEF Tapi_Ver20_ORGREATER}
  1438.       dwPredictiveAutoTransferStates,                      {// TAPI v2.0}
  1439.       dwTargetAddressSize,                                 {// TAPI v2.0}
  1440.       dwTargetAddressOffset,                               {// TAPI v2.0}
  1441.       dwSendingFlowspecSize,                               {// TAPI v2.0}
  1442.       dwSendingFlowspecOffset,                             {// TAPI v2.0}
  1443.       dwReceivingFlowspecSize,                             {// TAPI v2.0}
  1444.       dwReceivingFlowspecOffset,                           {// TAPI v2.0}
  1445.       dwDeviceClassSize,                                   {// TAPI v2.0}
  1446.       dwDeviceClassOffset,                                 {// TAPI v2.0}
  1447.       dwDeviceConfigSize,                                  {// TAPI v2.0}
  1448.       dwDeviceConfigOffset,                                {// TAPI v2.0}
  1449.       dwCallDataSize,                                      {// TAPI v2.0}
  1450.       dwCallDataOffset,                                    {// TAPI v2.0}
  1451.       dwNoAnswerTimeout,                                   {// TAPI v2.0}
  1452.       dwCallingPartyIDSize,                                {// TAPI v2.0}
  1453.       dwCallingPartyIDOffset: DWORD;                       {// TAPI v2.0}
  1454. {$ENDIF}
  1455.     end;
  1456.  
  1457.   LPLINECALLSTATUS = ^TLINECALLSTATUS;
  1458.   PLINECALLSTATUS = ^TLINECALLSTATUS;
  1459.   TLINECALLSTATUS =
  1460.     record
  1461.       dwTotalSize,
  1462.       dwNeededSize,
  1463.       dwUsedSize,
  1464.       dwCallState,
  1465.       dwCallStateMode,
  1466.       dwCallPrivilege,
  1467.       dwCallFeatures,
  1468.       dwDevSpecificSize,
  1469.       dwDevSpecificOffset: DWORD;
  1470.  
  1471. {$IFDEF Tapi_Ver20_ORGREATER}
  1472.       dwCallFeatures2: DWORD;                              {// TAPI v2.0}
  1473.       {$IFDEF Win32}
  1474.       tStateEntryTime: TSystemTime;                        {// TAPI v2.0}
  1475.       {$ELSE}
  1476.       tStateEntryTime: array[0..7] of Word;                {// TAPI v2.0}
  1477.       {$ENDIF}
  1478. {$ENDIF}
  1479.     end;
  1480.  
  1481.  
  1482. {$IFDEF Tapi_Ver20_ORGREATER}
  1483.   LPLINECALLTREATMENTENTRY = ^TLINECALLTREATMENTENTRY;
  1484.   PLINECALLTREATMENTENTRY = ^TLINECALLTREATMENTENTRY;
  1485.   TLINECALLTREATMENTENTRY =
  1486.     record
  1487.       dwCallTreatmentID,                                   {// TAPI v2.0}
  1488.       dwCallTreatmentNameSize,                             {// TAPI v2.0}
  1489.       dwCallTreatmentNameOffset: DWORD;                    {// TAPI v2.0}
  1490.     end;
  1491. {$ENDIF}
  1492.  
  1493.  
  1494.   LPLINECARDENTRY = ^TLINECARDENTRY;
  1495.   PLINECARDENTRY = ^TLINECARDENTRY;
  1496.   TLINECARDENTRY =
  1497.     record
  1498.       dwPermanentCardID,
  1499.       dwCardNameSize,
  1500.       dwCardNameOffset,
  1501.       dwCardNumberDigits,                                  {// TAPI v1.4}
  1502.       dwSameAreaRuleSize,                                  {// TAPI v1.4}
  1503.       dwSameAreaRuleOffset,                                {// TAPI v1.4}
  1504.       dwLongDistanceRuleSize,                              {// TAPI v1.4}
  1505.       dwLongDistanceRuleOffset,                            {// TAPI v1.4}
  1506.       dwInternationalRuleSize,                             {// TAPI v1.4}
  1507.       dwInternationalRuleOffset,                           {// TAPI v1.4}
  1508.       dwOptions: DWORD;                                    {// TAPI v1.4}
  1509.     end;
  1510.  
  1511.   LPLINECOUNTRYENTRY = ^TLINECOUNTRYENTRY;
  1512.   PLINECOUNTRYENTRY = ^TLINECOUNTRYENTRY;
  1513.   TLINECOUNTRYENTRY =
  1514.     record
  1515.       dwCountryID,                                         {// TAPI v1.4}
  1516.       dwCountryCode,                                       {// TAPI v1.4}
  1517.       dwNextCountryID,                                     {// TAPI v1.4}
  1518.       dwCountryNameSize,                                   {// TAPI v1.4}
  1519.       dwCountryNameOffset,                                 {// TAPI v1.4}
  1520.       dwSameAreaRuleSize,                                  {// TAPI v1.4}
  1521.       dwSameAreaRuleOffset,                                {// TAPI v1.4}
  1522.       dwLongDistanceRuleSize,                              {// TAPI v1.4}
  1523.       dwLongDistanceRuleOffset,                            {// TAPI v1.4}
  1524.       dwInternationalRuleSize,                             {// TAPI v1.4}
  1525.       dwInternationalRuleOffset: DWORD;                    {// TAPI v1.4}
  1526.     end;
  1527.  
  1528.   LPLINECOUNTRYLIST = ^TLINECOUNTRYLIST;
  1529.   PLINECOUNTRYLIST = ^TLINECOUNTRYLIST;
  1530.   TLINECOUNTRYLIST =
  1531.     record
  1532.       dwTotalSize,                                         {// TAPI v1.4}
  1533.       dwNeededSize,                                        {// TAPI v1.4}
  1534.       dwUsedSize,                                          {// TAPI v1.4}
  1535.       dwNumCountries,                                      {// TAPI v1.4}
  1536.       dwCountryListSize,                                   {// TAPI v1.4}
  1537.       dwCountryListOffset: DWORD;                          {// TAPI v1.4}
  1538.     end;
  1539.  
  1540.   LPLINEDEVCAPS = ^TLINEDEVCAPS;
  1541.   PLINEDEVCAPS = ^TLINEDEVCAPS;
  1542.   TLINEDEVCAPS =
  1543.     record
  1544.       dwTotalSize,
  1545.       dwNeededSize,
  1546.       dwUsedSize,
  1547.       dwProviderInfoSize,
  1548.       dwProviderInfoOffset,
  1549.       dwSwitchInfoSize,
  1550.       dwSwitchInfoOffset,
  1551.       dwPermanentLineID,
  1552.       dwLineNameSize,
  1553.       dwLineNameOffset,
  1554.       dwStringFormat,
  1555.       dwAddressModes,
  1556.       dwNumAddresses,
  1557.       dwBearerModes,
  1558.       dwMaxRate,
  1559.       dwMediaModes,
  1560.       dwGenerateToneModes,
  1561.       dwGenerateToneMaxNumFreq,
  1562.       dwGenerateDigitModes,
  1563.       dwMonitorToneMaxNumFreq,
  1564.       dwMonitorToneMaxNumEntries,
  1565.       dwMonitorDigitModes,
  1566.       dwGatherDigitsMinTimeout,
  1567.       dwGatherDigitsMaxTimeout,
  1568.       dwMedCtlDigitMaxListSize,
  1569.       dwMedCtlMediaMaxListSize,
  1570.       dwMedCtlToneMaxListSize,
  1571.       dwMedCtlCallStateMaxListSize,
  1572.       dwDevCapFlags,
  1573.       dwMaxNumActiveCalls,
  1574.       dwAnswerMode,
  1575.       dwRingModes,
  1576.       dwLineStates,
  1577.       dwUUIAcceptSize,
  1578.       dwUUIAnswerSize,
  1579.       dwUUIMakeCallSize,
  1580.       dwUUIDropSize,
  1581.       dwUUISendUserUserInfoSize,
  1582.       dwUUICallInfoSize: DWORD;
  1583.       MinDialParams,
  1584.       MaxDialParams,
  1585.       DefaultDialParams: TLINEDIALPARAMS;
  1586.       dwNumTerminals,
  1587.       dwTerminalCapsSize,
  1588.       dwTerminalCapsOffset,
  1589.       dwTerminalTextEntrySize,
  1590.       dwTerminalTextSize,
  1591.       dwTerminalTextOffset,
  1592.       dwDevSpecificSize,
  1593.       dwDevSpecificOffset,
  1594.  
  1595.       dwLineFeatures: DWORD;                               {// TAPI v1.4}
  1596.  
  1597. {$IFDEF Tapi_Ver20_ORGREATER}
  1598.       dwSettableDevStatus,                                 {// TAPI v2.0}
  1599.       dwDeviceClassesSize,                                 {// TAPI v2.0}
  1600.       dwDeviceClassesOffset: DWORD;                        {// TAPI v2.0}
  1601. {$ENDIF}
  1602.     end;
  1603.  
  1604.   LPLINEDEVSTATUS = ^TLINEDEVSTATUS;
  1605.   PLINEDEVSTATUS = ^TLINEDEVSTATUS;
  1606.   TLINEDEVSTATUS =
  1607.     record
  1608.       dwTotalSize,
  1609.       dwNeededSize,
  1610.       dwUsedSize,
  1611.       dwNumOpens,
  1612.       dwOpenMediaModes,
  1613.       dwNumActiveCalls,
  1614.       dwNumOnHoldCalls,
  1615.       dwNumOnHoldPendCalls,
  1616.       dwLineFeatures,
  1617.       dwNumCallCompletions,
  1618.       dwRingMode,
  1619.       dwSignalLevel,
  1620.       dwBatteryLevel,
  1621.       dwRoamMode,
  1622.       dwDevStatusFlags,
  1623.       dwTerminalModesSize,
  1624.       dwTerminalModesOffset,
  1625.       dwDevSpecificSize,
  1626.       dwDevSpecificOffset: DWORD;
  1627.  
  1628. {$IFDEF Tapi_Ver20_ORGREATER}
  1629.       dwAvailableMediaModes,                               {// TAPI v2.0}
  1630.       dwAppInfoSize,                                       {// TAPI v2.0}
  1631.       dwAppInfoOffset: DWORD;                              {// TAPI v2.0}
  1632. {$ENDIF}
  1633.     end;
  1634.  
  1635.   LPLINEEXTENSIONID = ^TLINEEXTENSIONID;
  1636.   PLINEEXTENSIONID = ^TLINEEXTENSIONID;
  1637.   TLINEEXTENSIONID =
  1638.     record
  1639.       dwExtensionID0,
  1640.       dwExtensionID1,
  1641.       dwExtensionID2,
  1642.       dwExtensionID3: DWORD;
  1643.     end;
  1644.  
  1645.   LPLINEFORWARD = ^TLINEFORWARD;
  1646.   PLINEFORWARD = ^TLINEFORWARD;
  1647.   TLINEFORWARD =
  1648.     record
  1649.       dwForwardMode,
  1650.       dwCallerAddressSize,
  1651.       dwCallerAddressOffset,
  1652.       dwDestCountryCode,
  1653.       dwDestAddressSize,
  1654.       dwDestAddressOffset: DWORD;
  1655.     end;
  1656.  
  1657.   LPLINEFORWARDLIST = ^TLINEFORWARDLIST;
  1658.   PLINEFORWARDLIST = ^TLINEFORWARDLIST;
  1659.   TLINEFORWARDLIST =
  1660.     record
  1661.       dwTotalSize,
  1662.       dwNumEntries: DWORD;
  1663.       {!! JEDI:bchoate:1997-11-11: Added ForwardList field,
  1664.        missing from 1996-11-25 revision }
  1665.       ForwardList: array [0..0] of TLINEFORWARD;
  1666.     end;
  1667.  
  1668.   LPLINEGENERATETONE = ^TLINEGENERATETONE;
  1669.   PLINEGENERATETONE = ^TLINEGENERATETONE;
  1670.   TLINEGENERATETONE =
  1671.     record
  1672.       dwFrequency,
  1673.       dwCadenceOn,
  1674.       dwCadenceOff,
  1675.       dwVolume: DWORD;
  1676.     end;
  1677.  
  1678. {$IFDEF Tapi_Ver20_ORGREATER}
  1679.   THandleUnion =
  1680.     record
  1681.       case longint of
  1682.         0 :
  1683.           (hEvent: THandle);
  1684.         1 :
  1685.           (hCompletionPort: THandle);
  1686.     end;
  1687.  
  1688.   LPLINEINITIALIZEEXPARAMS = ^TLINEINITIALIZEEXPARAMS;
  1689.   PLINEINITIALIZEEXPARAMS = ^TLINEINITIALIZEEXPARAMS;
  1690.   TLINEINITIALIZEEXPARAMS =
  1691.     record
  1692.       dwTotalSize,                                         {// TAPI v2.0}
  1693.       dwNeededSize,                                        {// TAPI v2.0}
  1694.       dwUsedSize,                                          {// TAPI v2.0}
  1695.       dwOptions: DWORD;                                    {// TAPI v2.0}
  1696.  
  1697.       Handles: THandleUnion; {//!! Union converted to THandleUnion}
  1698.  
  1699.       dwCompletionKey: DWORD;                              {// TAPI v2.0}
  1700.     end;
  1701. {$ENDIF}
  1702.  
  1703.   LPLINELOCATIONENTRY = ^TLINELOCATIONENTRY;
  1704.   PLINELOCATIONENTRY = ^TLINELOCATIONENTRY;
  1705.   TLINELOCATIONENTRY =
  1706.     record
  1707.       dwPermanentLocationID,
  1708.       dwLocationNameSize,
  1709.       dwLocationNameOffset,
  1710.       dwCountryCode,
  1711.       dwCityCodeSize,
  1712.       dwCityCodeOffset,
  1713.       dwPreferredCardID,
  1714.  
  1715.       dwLocalAccessCodeSize,                               {// TAPI v1.4}
  1716.       dwLocalAccessCodeOffset,                             {// TAPI v1.4}
  1717.       dwLongDistanceAccessCodeSize,                        {// TAPI v1.4}
  1718.       dwLongDistanceAccessCodeOffset,                      {// TAPI v1.4}
  1719.       dwTollPrefixListSize,                                {// TAPI v1.4}
  1720.       dwTollPrefixListOffset,                              {// TAPI v1.4}
  1721.       dwCountryID,                                         {// TAPI v1.4}
  1722.       dwOptions,                                           {// TAPI v1.4}
  1723.       dwCancelCallWaitingSize,                             {// TAPI v1.4}
  1724.       dwCancelCallWaitingOffset: DWORD;                    {// TAPI v1.4}
  1725.     end;
  1726.  
  1727.   LPLINEMEDIACONTROLCALLSTATE = ^TLINEMEDIACONTROLCALLSTATE;
  1728.   PLINEMEDIACONTROLCALLSTATE = ^TLINEMEDIACONTROLCALLSTATE;
  1729.   TLINEMEDIACONTROLCALLSTATE =
  1730.     record
  1731.       dwCallStates,
  1732.       dwMediaControl: DWORD;
  1733.     end;
  1734.  
  1735.   LPLINEMEDIACONTROLDIGIT = ^TLINEMEDIACONTROLDIGIT;
  1736.   PLINEMEDIACONTROLDIGIT = ^TLINEMEDIACONTROLDIGIT;
  1737.   TLINEMEDIACONTROLDIGIT =
  1738.     record
  1739.       dwDigit,
  1740.       dwDigitModes,
  1741.       dwMediaControl: DWORD;
  1742.     end;
  1743.  
  1744.   LPLINEMEDIACONTROLMEDIA = ^TLINEMEDIACONTROLMEDIA;
  1745.   PLINEMEDIACONTROLMEDIA = ^TLINEMEDIACONTROLMEDIA;
  1746.   TLINEMEDIACONTROLMEDIA =
  1747.     record
  1748.       dwMediaModes,
  1749.       dwDuration,
  1750.       dwMediaControl: DWORD;
  1751.     end;
  1752.  
  1753.   LPLINEMEDIACONTROLTONE = ^TLINEMEDIACONTROLTONE;
  1754.   PLINEMEDIACONTROLTONE = ^TLINEMEDIACONTROLTONE;
  1755.   TLINEMEDIACONTROLTONE =
  1756.     record
  1757.       dwAppSpecific,
  1758.       dwDuration,
  1759.       dwFrequency1,
  1760.       dwFrequency2,
  1761.       dwFrequency3,
  1762.       dwMediaControl: DWORD;
  1763.     end;
  1764.  
  1765. {$IFDEF Tapi_Ver20_ORGREATER}
  1766.   LPLINEMESSAGE = ^TLINEMESSAGE;
  1767.   PLINEMESSAGE = ^TLINEMESSAGE;
  1768.   TLINEMESSAGE =
  1769.     record
  1770.       hDevice,                                             {// TAPI v2.0}
  1771.       dwMessageID,                                         {// TAPI v2.0}
  1772.       dwCallbackInstance,                                  {// TAPI v2.0}
  1773.       dwParam1,                                            {// TAPI v2.0}
  1774.       dwParam2,                                            {// TAPI v2.0}
  1775.       dwParam3: DWORD;                                     {// TAPI v2.0}
  1776.     end;
  1777. {$ENDIF}
  1778.  
  1779.   LPLINEMONITORTONE = ^TLINEMONITORTONE;
  1780.   PLINEMONITORTONE = ^TLINEMONITORTONE;
  1781.   TLINEMONITORTONE =
  1782.     record
  1783.       dwAppSpecific,
  1784.       dwDuration,
  1785.       dwFrequency1,
  1786.       dwFrequency2,
  1787.       dwFrequency3: DWORD;
  1788.     end;
  1789.  
  1790.   LPLINEPROVIDERENTRY = ^TLINEPROVIDERENTRY;
  1791.   PLINEPROVIDERENTRY = ^TLINEPROVIDERENTRY;
  1792.   TLINEPROVIDERENTRY =
  1793.     record
  1794.       dwPermanentProviderID,                               {// TAPI v1.4}
  1795.       dwProviderFilenameSize,                              {// TAPI v1.4}
  1796.       dwProviderFilenameOffset: DWORD;                     {// TAPI v1.4}
  1797.     end;
  1798.  
  1799.   LPLINEPROVIDERLIST = ^TLINEPROVIDERLIST;
  1800.   PLINEPROVIDERLIST = ^TLINEPROVIDERLIST;
  1801.   TLINEPROVIDERLIST =
  1802.     record
  1803.       dwTotalSize,                                         {// TAPI v1.4}
  1804.       dwNeededSize,                                        {// TAPI v1.4}
  1805.       dwUsedSize,                                          {// TAPI v1.4}
  1806.       dwNumProviders,                                      {// TAPI v1.4}
  1807.       dwProviderListSize,                                  {// TAPI v1.4}
  1808.       dwProviderListOffset: DWORD;                         {// TAPI v1.4}
  1809.     end;
  1810.  
  1811. {$IFDEF Tapi_Ver20_ORGREATER}
  1812.   LPLINEPROXYREQUEST = ^TLINEPROXYREQUEST;
  1813.   PLINEPROXYREQUEST = ^TLINEPROXYREQUEST;
  1814.   TLINEPROXYREQUEST =
  1815.     record
  1816.       dwSize,                                              {// TAPI v2.0}
  1817.       dwClientMachineNameSize,                             {// TAPI v2.0}
  1818.       dwClientMachineNameOffset,                           {// TAPI v2.0}
  1819.       dwClientUserNameSize,                                {// TAPI v2.0}
  1820.       dwClientUserNameOffset,                              {// TAPI v2.0}
  1821.       dwClientAppAPIVersion,                               {// TAPI v2.0}
  1822.       dwRequestType: DWORD;                                {// TAPI v2.0}
  1823.  
  1824.       case longint of
  1825.         0 :
  1826.           (
  1827.             SetAgentGroup :
  1828.               record
  1829.                 dwAddressID: DWORD;                        {// TAPI v2.0}
  1830.                 GroupList: TLINEAGENTGROUPLIST;            {// TAPI v2.0}
  1831.               end;
  1832.           );
  1833.         1 :
  1834.           (
  1835.             SetAgentState :
  1836.               record
  1837.                 dwAddressID,                               {// TAPI v2.0}
  1838.                 dwAgentState,                              {// TAPI v2.0}
  1839.                 dwNextAgentState: DWORD;                   {// TAPI v2.0}
  1840.               end;
  1841.           );
  1842.         2 :
  1843.           (
  1844.             SetAgentActivity :
  1845.               record
  1846.                 dwAddressID: DWORD;                        {// TAPI v2.0}
  1847.                 dwActivityID: DWORD;                       {// TAPI v2.0}
  1848.               end;
  1849.           );
  1850.         3 :
  1851.           (
  1852.             GetAgentCaps :
  1853.               record
  1854.                 dwAddressID: DWORD;                        {// TAPI v2.0}
  1855.                 AgentCaps: TLINEAGENTCAPS;                 {// TAPI v2.0}
  1856.               end;
  1857.           );
  1858.         4 :
  1859.           (
  1860.             GetAgentStatus :
  1861.               record
  1862.                 dwAddressID: DWORD;                        {// TAPI v2.0}
  1863.                 AgentStatus: TLINEAGENTSTATUS;             {// TAPI v2.0}
  1864.               end;
  1865.           );
  1866.         5 :
  1867.           (
  1868.             AgentSpecific :
  1869.               record
  1870.                 dwAddressID,                               {// TAPI v2.0}
  1871.                 dwAgentExtensionIDIndex,                   {// TAPI v2.0}
  1872.                 dwSize: DWORD;                             {// TAPI v2.0}
  1873.                 Params: array[0..0] of Byte;               {// TAPI v2.0}
  1874.               end;
  1875.           );
  1876.         6 :
  1877.           (
  1878.             GetAgentActivityList :
  1879.               record
  1880.                 dwAddressID: DWORD;                        {// TAPI v2.0}
  1881.                 ActivityList: TLINEAGENTACTIVITYLIST;      {// TAPI v2.0}
  1882.               end;
  1883.           );
  1884.         7 :
  1885.           (
  1886.             GetAgentGroupList :
  1887.               record
  1888.                 dwAddressID: DWORD;                        {// TAPI v2.0}
  1889.                 GroupList: TLINEAGENTGROUPLIST;            {// TAPI v2.0}
  1890.               end;
  1891.           );
  1892.     end;
  1893. {$ENDIF}
  1894.  
  1895.  
  1896.   LPLINEREQMAKECALLA = ^TLINEREQMAKECALLA;
  1897.   PLINEREQMAKECALLA = ^TLINEREQMAKECALLA;
  1898.   TLINEREQMAKECALLA =
  1899.     record
  1900.       szDestAddress: array[0..TAPIMAXDESTADDRESSSIZE - 1] of Char;
  1901.       szAppName    : array[0..TAPIMAXAPPNAMESIZE - 1] of Char;
  1902.       szCalledParty: array[0..TAPIMAXCALLEDPARTYSIZE - 1] of Char;
  1903.       szComment    : array[0..TAPIMAXCOMMENTSIZE - 1] of Char;
  1904.     end;
  1905.  
  1906. {$IFDEF Tapi_Ver20_ORGREATER}
  1907.   LPLINEREQMAKECALLW = ^TLINEREQMAKECALLW;
  1908.   PLINEREQMAKECALLW = ^TLINEREQMAKECALLW;
  1909.   TLINEREQMAKECALLW =
  1910.     record
  1911.       szDestAddress: array[0..TAPIMAXDESTADDRESSSIZE - 1] of WideChar;
  1912.       szAppName    : array[0..TAPIMAXAPPNAMESIZE - 1] of WideChar;
  1913.       szCalledParty: array[0..TAPIMAXCALLEDPARTYSIZE - 1] of WideChar;
  1914.       szComment    : array[0..TAPIMAXCOMMENTSIZE - 1] of WideChar;
  1915.     end;
  1916. {$IFDEF UNICODE}
  1917.   LPLINEREQMAKECALL = ^TLINEREQMAKECALL;
  1918.   PLINEREQMAKECALL = ^TLINEREQMAKECALL;
  1919.   TLINEREQMAKECALL = TLINEREQMAKECALLW;
  1920. {$ELSE}
  1921.   LPLINEREQMAKECALL = ^TLINEREQMAKECALL;
  1922.   PLINEREQMAKECALL = ^TLINEREQMAKECALL;
  1923.   TLINEREQMAKECALL = TLINEREQMAKECALLA;
  1924. {$ENDIF}
  1925. {$ELSE}
  1926.   LPLINEREQMAKECALL = ^TLINEREQMAKECALL;
  1927.   PLINEREQMAKECALL = ^TLINEREQMAKECALL;
  1928.   TLINEREQMAKECALL = TLINEREQMAKECALLA;
  1929. {$ENDIF}
  1930.  
  1931.   LPLINEREQMEDIACALLA = ^TLINEREQMEDIACALLA;
  1932.   PLINEREQMEDIACALLA = ^TLINEREQMEDIACALLA;
  1933.   TLINEREQMEDIACALLA =
  1934.     record
  1935.       hWnd         : HWND;
  1936.       wRequestID   : WPARAM;
  1937.       szDeviceClass: array[0..TAPIMAXDEVICECLASSSIZE - 1] of Char;
  1938.       ucDeviceID   : array[0..TAPIMAXDEVICEIDSIZE - 1] of Byte;
  1939.       dwSize,
  1940.       dwSecure     : DWORD;
  1941.       {!! JEDI:bchoate:1997-11-11: Changed length of array to length - 1
  1942.        to be consistent (for the next 4 fields) }
  1943.       szDestAddress: array[0..TAPIMAXDESTADDRESSSIZE - 1] of Char;
  1944.       szAppName    : array[0..TAPIMAXAPPNAMESIZE - 1] of Char;
  1945.       szCalledParty: array[0..TAPIMAXCALLEDPARTYSIZE - 1] of Char;
  1946.       szComment    : array[0..TAPIMAXCOMMENTSIZE - 1] of Char;
  1947.     end;
  1948.  
  1949. {$IFDEF Tapi_Ver20_ORGREATER}
  1950.   LPLINEREQMEDIACALLW = ^TLINEREQMEDIACALLW;
  1951.   PLINEREQMEDIACALLW = ^TLINEREQMEDIACALLW;
  1952.   TLINEREQMEDIACALLW =
  1953.     record
  1954.       hWnd         : HWND;
  1955.       wRequestID   : WPARAM;
  1956.       szDeviceClass: array[0..TAPIMAXDEVICECLASSSIZE - 1] of WideChar;
  1957.       ucDeviceID   : array[0..TAPIMAXDEVICEIDSIZE - 1] of Byte;
  1958.       dwSize,
  1959.       dwSecure     : DWORD;
  1960.       {!! JEDI:bchoate:1997-11-11: Changed length of array to length - 1
  1961.        to be consistent (for the next 4 fields) }
  1962.       szDestAddress: array[0..TAPIMAXDESTADDRESSSIZE - 1] of WideChar;
  1963.       szAppName    : array[0..TAPIMAXAPPNAMESIZE - 1] of WideChar;
  1964.       szCalledParty: array[0..TAPIMAXCALLEDPARTYSIZE - 1] of WideChar;
  1965.       szComment    : array[0..TAPIMAXCOMMENTSIZE - 1] of WideChar;
  1966.     end;
  1967. {$IFDEF UNICODE}
  1968.   LPLINEREQMEDIACALL = ^TLINEREQMEDIACALL;
  1969.   PLINEREQMEDIACALL = ^TLINEREQMEDIACALL;
  1970.   TLINEREQMEDIACALL = TLINEREQMEDIACALLW;
  1971. {$ELSE}
  1972.   LPLINEREQMEDIACALL = ^TLINEREQMEDIACALL;
  1973.   PLINEREQMEDIACALL = ^TLINEREQMEDIACALL;
  1974.   TLINEREQMEDIACALL = TLINEREQMEDIACALLA;
  1975. {$ENDIF}
  1976. {$ELSE}
  1977.   LPLINEREQMEDIACALL = ^TLINEREQMEDIACALL;
  1978.   PLINEREQMEDIACALL = ^TLINEREQMEDIACALL;
  1979.   TLINEREQMEDIACALL = TLINEREQMEDIACALLA;
  1980. {$ENDIF}
  1981.  
  1982.  
  1983.   LPLINETERMCAPS = ^TLINETERMCAPS;
  1984.   PLINETERMCAPS = ^TLINETERMCAPS;
  1985.   TLINETERMCAPS =
  1986.     record
  1987.       dwTermDev,
  1988.       dwTermModes,
  1989.       dwTermSharing: DWORD;
  1990.     end;
  1991.  
  1992.   LPLINETRANSLATECAPS = ^TLINETRANSLATECAPS;
  1993.   PLINETRANSLATECAPS = ^TLINETRANSLATECAPS;
  1994.   TLINETRANSLATECAPS =
  1995.     record
  1996.       dwTotalSize,
  1997.       dwNeededSize,
  1998.       dwUsedSize,
  1999.       dwNumLocations,
  2000.       dwLocationListSize,
  2001.       dwLocationListOffset,
  2002.       dwCurrentLocationID,
  2003.       dwNumCards,
  2004.       dwCardListSize,
  2005.       dwCardListOffset,
  2006.       dwCurrentPreferredCardID: DWORD;
  2007.     end;
  2008.  
  2009.   LPLINETRANSLATEOUTPUT = ^TLINETRANSLATEOUTPUT;
  2010.   PLINETRANSLATEOUTPUT = ^TLINETRANSLATEOUTPUT;
  2011.   TLINETRANSLATEOUTPUT =
  2012.     record
  2013.       dwTotalSize,
  2014.       dwNeededSize,
  2015.       dwUsedSize,
  2016.       dwDialableStringSize,
  2017.       dwDialableStringOffset,
  2018.       dwDisplayableStringSize,
  2019.       dwDisplayableStringOffset,
  2020.       dwCurrentCountry,
  2021.       dwDestCountry,
  2022.       dwTranslateResults: DWORD;
  2023.     end;
  2024.  
  2025.   LPPHONEBUTTONINFO = ^TPHONEBUTTONINFO;
  2026.   PPHONEBUTTONINFO = ^TPHONEBUTTONINFO;
  2027.   TPHONEBUTTONINFO =
  2028.     record
  2029.       dwTotalSize,
  2030.       dwNeededSize,
  2031.       dwUsedSize,
  2032.       dwButtonMode,
  2033.       dwButtonFunction,
  2034.       dwButtonTextSize,
  2035.       dwButtonTextOffset,
  2036.       dwDevSpecificSize,
  2037.       dwDevSpecificOffset,
  2038.  
  2039.       dwButtonState: DWORD;                                {// TAPI v1.4}
  2040.     end;
  2041.  
  2042.   LPPHONECAPS = ^TPHONECAPS;
  2043.   PPHONECAPS = ^TPHONECAPS;
  2044.   TPHONECAPS =
  2045.     record
  2046.       dwTotalSize,
  2047.       dwNeededSize,
  2048.       dwUsedSize,
  2049.       dwProviderInfoSize,
  2050.       dwProviderInfoOffset,
  2051.       dwPhoneInfoSize,
  2052.       dwPhoneInfoOffset,
  2053.       dwPermanentPhoneID,
  2054.       dwPhoneNameSize,
  2055.       dwPhoneNameOffset,
  2056.       dwStringFormat,
  2057.       dwPhoneStates,
  2058.       dwHookSwitchDevs,
  2059.       dwHandsetHookSwitchModes,
  2060.       dwSpeakerHookSwitchModes,
  2061.       dwHeadsetHookSwitchModes,
  2062.       dwVolumeFlags,
  2063.       dwGainFlags,
  2064.       dwDisplayNumRows,
  2065.       dwDisplayNumColumns,
  2066.       dwNumRingModes,
  2067.       dwNumButtonLamps,
  2068.       dwButtonModesSize,
  2069.       dwButtonModesOffset,
  2070.       dwButtonFunctionsSize,
  2071.       dwButtonFunctionsOffset,
  2072.       dwLampModesSize,
  2073.       dwLampModesOffset,
  2074.       dwNumSetData,
  2075.       dwSetDataSize,
  2076.       dwSetDataOffset,
  2077.       dwNumGetData,
  2078.       dwGetDataSize,
  2079.       dwGetDataOffset,
  2080.       dwDevSpecificSize,
  2081.       dwDevSpecificOffset: DWORD;
  2082.  
  2083. {$IFDEF Tapi_Ver20_ORGREATER}
  2084.       dwDeviceClassesSize,                                 {// TAPI v2.0}
  2085.       dwDeviceClassesOffset,                               {// TAPI v2.0}
  2086.       dwPhoneFeatures,                                     {// TAPI v2.0}
  2087.       dwSettableHandsetHookSwitchModes,                    {// TAPI v2.0}
  2088.       dwSettableSpeakerHookSwitchModes,                    {// TAPI v2.0}
  2089.       dwSettableHeadsetHookSwitchModes,                    {// TAPI v2.0}
  2090.       dwMonitoredHandsetHookSwitchModes,                   {// TAPI v2.0}
  2091.       dwMonitoredSpeakerHookSwitchModes,                   {// TAPI v2.0}
  2092.       dwMonitoredHeadsetHookSwitchModes: DWORD;            {// TAPI v2.0}
  2093. {$ENDIF}
  2094.     end;
  2095.  
  2096.   LPPHONEEXTENSIONID = ^TPHONEEXTENSIONID;
  2097.   PPHONEEXTENSIONID = ^TPHONEEXTENSIONID;
  2098.   TPHONEEXTENSIONID =
  2099.     record
  2100.       dwExtensionID0,
  2101.       dwExtensionID1,
  2102.       dwExtensionID2,
  2103.       dwExtensionID3: DWORD;
  2104.     end;
  2105.  
  2106. {$IFDEF Tapi_Ver20_ORGREATER}
  2107.   LPPHONEINITIALIZEEXPARAMS = ^TPHONEINITIALIZEEXPARAMS;
  2108.   PPHONEINITIALIZEEXPARAMS = ^TPHONEINITIALIZEEXPARAMS;
  2109.   TPHONEINITIALIZEEXPARAMS =
  2110.     record
  2111.       dwTotalSize,                                         {// TAPI v2.0}
  2112.       dwNeededSize,                                        {// TAPI v2.0}
  2113.       dwUsedSize,                                          {// TAPI v2.0}
  2114.       dwOptions: DWORD;                                    {// TAPI v2.0}
  2115.  
  2116.       Handles: THandleUnion; {//!! Union converted to THandleUnion}
  2117.  
  2118.       dwCompletionKey: DWORD;                              {// TAPI v2.0}
  2119.     end;
  2120.  
  2121.   LPPHONEMESSAGE = ^TPHONEMESSAGE;
  2122.   PPHONEMESSAGE = ^TPHONEMESSAGE;
  2123.   TPHONEMESSAGE =
  2124.     record
  2125.       hDevice,                                             {// TAPI v2.0}
  2126.       dwMessageID,                                         {// TAPI v2.0}
  2127.       dwCallbackInstance,                                  {// TAPI v2.0}
  2128.       dwParam1,                                            {// TAPI v2.0}
  2129.       dwParam2,                                            {// TAPI v2.0}
  2130.       dwParam3: DWORD;                                     {// TAPI v2.0}
  2131.     end;
  2132. {$ENDIF}
  2133.  
  2134.   LPPHONESTATUS = ^TPHONESTATUS;
  2135.   PPHONESTATUS = ^TPHONESTATUS;
  2136.   TPHONESTATUS =
  2137.     record
  2138.       dwTotalSize,
  2139.       dwNeededSize,
  2140.       dwUsedSize,
  2141.       dwStatusFlags,
  2142.       dwNumOwners,
  2143.       dwNumMonitors,
  2144.       dwRingMode,
  2145.       dwRingVolume,
  2146.       dwHandsetHookSwitchMode,
  2147.       dwHandsetVolume,
  2148.       dwHandsetGain,
  2149.       dwSpeakerHookSwitchMode,
  2150.       dwSpeakerVolume,
  2151.       dwSpeakerGain,
  2152.       dwHeadsetHookSwitchMode,
  2153.       dwHeadsetVolume,
  2154.       dwHeadsetGain,
  2155.       dwDisplaySize,
  2156.       dwDisplayOffset,
  2157.       dwLampModesSize,
  2158.       dwLampModesOffset,
  2159.       dwOwnerNameSize,
  2160.       dwOwnerNameOffset,
  2161.       dwDevSpecificSize,
  2162.       dwDevSpecificOffset: DWORD;
  2163.  
  2164. {$IFDEF Tapi_Ver20_ORGREATER}
  2165.       dwPhoneFeatures: DWORD;                              {// TAPI v2.0}
  2166. {$ENDIF}
  2167.     end;
  2168.  
  2169.   LPVARSTRING = ^TVARSTRING;
  2170.   PVARSTRING = ^TVARSTRING;
  2171.   TVARSTRING =
  2172.     record
  2173.       dwTotalSize,
  2174.       dwNeededSize,
  2175.       dwUsedSize,
  2176.       dwStringFormat,
  2177.       dwStringSize,
  2178.       dwStringOffset: DWORD;
  2179.     end;
  2180.  
  2181.  
  2182. function lineAccept(
  2183.     hCall: HCALL;
  2184.     lpsUserUserInfo: LPCSTR;
  2185.     dwSize: DWORD): LONG;
  2186.     stdcall;
  2187.  
  2188. function lineAddProvider(                                  {// TAPI v1.4}
  2189.     lpszProviderFilename: LPCSTR;
  2190.     hwndOwner: HWND;
  2191.     lpdwPermanentProviderID: LPDWORD): LONG;
  2192.     stdcall;
  2193.  
  2194. {$IFDEF Win32}
  2195. function lineAddProviderA(                                 {// TAPI v1.4}
  2196.     lpszProviderFilename: LPCSTR;
  2197.     hwndOwner: HWND;
  2198.     lpdwPermanentProviderID: LPDWORD): LONG;
  2199.     stdcall;
  2200.  
  2201. function lineAddProviderW(
  2202.     lpszProviderFilename: LPCWSTR;
  2203.     hwndOwner: HWND;
  2204.     lpdwPermanentProviderID: LPDWORD): LONG;
  2205.     stdcall;
  2206. {$ENDIF}
  2207.  
  2208. function lineAddToConference(
  2209.     hConfCall: HCALL;
  2210.     hConsultCall: HCALL): LONG;
  2211.     stdcall;
  2212.  
  2213. {$IFDEF Tapi_Ver20_ORGREATER}
  2214. function lineAgentSpecific(                                {// TAPI v2.0}
  2215.     hLine: HLINE;
  2216.     dwAddressID: DWORD;
  2217.     dwAgentExtensionIDIndex: DWORD;
  2218.     lpParams: LPVOID;
  2219.     dwSize: DWORD): LONG;
  2220.     stdcall;
  2221. {$ENDIF}
  2222.  
  2223. function lineAnswer(
  2224.     hCall: HCALL;
  2225.     lpsUserUserInfo: LPCSTR;
  2226.     dwSize: DWORD): LONG;
  2227.     stdcall;
  2228.  
  2229. function lineBlindTransfer(
  2230.     hCall: HCALL;
  2231.     lpszDestAddress: LPCSTR;
  2232.     dwCountryCode: DWORD): LONG;
  2233.     stdcall;
  2234.  
  2235. {$IFDEF Win32}
  2236. function lineBlindTransferA(
  2237.     hCall: HCALL;
  2238.     lpszDestAddress: LPCSTR;
  2239.     dwCountryCode: DWORD): LONG;
  2240.     stdcall;
  2241.  
  2242. function lineBlindTransferW(
  2243.     hCall: HCALL;
  2244.     lpszDestAddressW: LPCWSTR;
  2245.     dwCountryCode: DWORD): LONG;
  2246.     stdcall;
  2247. {$ENDIF}
  2248.  
  2249. function lineClose(
  2250.     hLine: HLINE): LONG;
  2251.     stdcall;
  2252.  
  2253. function lineCompleteCall(
  2254.     hCall: HCALL;
  2255.     lpdwCompletionID: LPDWORD;
  2256.     dwCompletionMode: DWORD;
  2257.     dwMessageID: DWORD): LONG;
  2258.     stdcall;
  2259.  
  2260. function lineCompleteTransfer(
  2261.     hCall: HCALL;
  2262.     hConsultCall: HCALL;
  2263.     lphConfCall: LPHCALL;
  2264.     dwTransferMode: DWORD): LONG;
  2265.     stdcall;
  2266.  
  2267. function lineConfigDialog(
  2268.     dwDeviceID: DWORD;
  2269.     hwndOwner: HWND;
  2270.     lpszDeviceClass: LPCSTR): LONG;
  2271.     stdcall;
  2272.  
  2273. {$IFDEF Win32}
  2274. function lineConfigDialogA(
  2275.     dwDeviceID: DWORD;
  2276.     hwndOwner: HWND;
  2277.     lpszDeviceClass: LPCSTR): LONG;
  2278.     stdcall;
  2279.  
  2280. function lineConfigDialogW(
  2281.     dwDeviceID: DWORD;
  2282.     hwndOwner: HWND;
  2283.     lpszDeviceClass: LPCWSTR): LONG;
  2284.     stdcall;
  2285. {$ENDIF}
  2286.  
  2287. function lineConfigDialogEdit(                             {// TAPI v1.4}
  2288.     dwDeviceID: DWORD;
  2289.     hwndOwner: HWND;
  2290.     lpszDeviceClass: LPCSTR;
  2291.     const lpDeviceConfigIn: LPVOID;
  2292.     dwSize: DWORD;
  2293.     lpDeviceConfigOut: LPVARSTRING): LONG;
  2294.     stdcall;
  2295.  
  2296. {$IFDEF Win32}
  2297. function lineConfigDialogEditA(                            {// TAPI v1.4}
  2298.     dwDeviceID: DWORD;
  2299.     hwndOwner: HWND;
  2300.     lpszDeviceClass: LPCSTR;
  2301.     const lpDeviceConfigIn: LPVOID;
  2302.     dwSize: DWORD;
  2303.     lpDeviceConfigOut: LPVARSTRING): LONG;
  2304.     stdcall;
  2305.  
  2306. function lineConfigDialogEditW(
  2307.     dwDeviceID: DWORD;
  2308.     hwndOwner: HWND;
  2309.     lpszDeviceClass: LPCWSTR;
  2310.     const lpDeviceConfigIn: LPVOID;
  2311.     dwSize: DWORD;
  2312.     lpDeviceConfigOut: LPVARSTRING): LONG;
  2313.     stdcall;
  2314. {$ENDIF}
  2315.  
  2316. function lineConfigProvider(                               {// TAPI v1.4}
  2317.     hwndOwner: HWND;
  2318.     dwPermanentProviderID: DWORD): LONG;
  2319.     stdcall;
  2320.  
  2321. function lineDeallocateCall(
  2322.     hCall: HCALL): LONG;
  2323.     stdcall;
  2324.  
  2325. function lineDevSpecific(
  2326.     hLine: HLINE;
  2327.     dwAddressID: DWORD;
  2328.     hCall: HCALL;
  2329.     lpParams: LPVOID;
  2330.     dwSize: DWORD): LONG;
  2331.     stdcall;
  2332.  
  2333. function lineDevSpecificFeature(
  2334.     hLine: HLINE;
  2335.     dwFeature: DWORD;
  2336.     lpParams: LPVOID;
  2337.     dwSize: DWORD): LONG;
  2338.     stdcall;
  2339.  
  2340. function lineDial(
  2341.     hCall: HCALL;
  2342.     lpszDestAddress: LPCSTR;
  2343.     dwCountryCode: DWORD): LONG;
  2344.     stdcall;
  2345.  
  2346. {$IFDEF Win32}
  2347. function lineDialA(
  2348.     hCall: HCALL;
  2349.     lpszDestAddress: LPCSTR;
  2350.     dwCountryCode: DWORD): LONG;
  2351.     stdcall;
  2352.  
  2353. function lineDialW(
  2354.     hCall: HCALL;
  2355.     lpszDestAddress: LPCWSTR;
  2356.     dwCountryCode: DWORD): LONG;
  2357.     stdcall;
  2358. {$ENDIF}
  2359.  
  2360. function lineDrop(
  2361.     hCall: HCALL;
  2362.     lpsUserUserInfo: LPCSTR;
  2363.     dwSize: DWORD): LONG;
  2364.     stdcall;
  2365.  
  2366. function lineForward(
  2367.     hLine: HLINE;
  2368.     bAllAddresses: DWORD;
  2369.     dwAddressID: DWORD;
  2370.     const lpForwardList: LPLINEFORWARDLIST;
  2371.     dwNumRingsNoAnswer: DWORD;
  2372.     lphConsultCall: LPHCALL;
  2373.     const lpCallParams: LPLINECALLPARAMS): LONG;
  2374.     stdcall;
  2375.  
  2376. {$IFDEF Win32}
  2377. function lineForwardA(
  2378.     hLine: HLINE;
  2379.     bAllAddresses: DWORD;
  2380.     dwAddressID: DWORD;
  2381.     const lpForwardList: LPLINEFORWARDLIST;
  2382.     dwNumRingsNoAnswer: DWORD;
  2383.     lphConsultCall: LPHCALL;
  2384.     const lpCallParams: LPLINECALLPARAMS): LONG;
  2385.     stdcall;
  2386.  
  2387. function lineForwardW(
  2388.     hLine: HLINE;
  2389.     bAllAddresses: DWORD;
  2390.     dwAddressID: DWORD;
  2391.     const lpForwardList: LPLINEFORWARDLIST;
  2392.     dwNumRingsNoAnswer: DWORD;
  2393.     lphConsultCall: LPHCALL;
  2394.     const lpCallParams: LPLINECALLPARAMS): LONG;
  2395.     stdcall;
  2396. {$ENDIF}
  2397.  
  2398. function lineGatherDigits(
  2399.     hCall: HCALL;
  2400.     dwDigitModes: DWORD;
  2401.     lpsDigits: LPSTR;
  2402.     dwNumDigits: DWORD;
  2403.     lpszTerminationDigits: LPCSTR;
  2404.     dwFirstDigitTimeout: DWORD;
  2405.     dwInterDigitTimeout: DWORD): LONG;
  2406.     stdcall;
  2407.  
  2408. {$IFDEF Win32}
  2409. function lineGatherDigitsA(
  2410.     hCall: HCALL;
  2411.     dwDigitModes: DWORD;
  2412.     lpsDigits: LPSTR;
  2413.     dwNumDigits: DWORD;
  2414.     lpszTerminationDigits: LPCSTR;
  2415.     dwFirstDigitTimeout: DWORD;
  2416.     dwInterDigitTimeout: DWORD): LONG;
  2417.     stdcall;
  2418.  
  2419. function lineGatherDigitsW(
  2420.     hCall: HCALL;
  2421.     dwDigitModes: DWORD;
  2422.     lpsDigits: LPWSTR;
  2423.     dwNumDigits: DWORD;
  2424.     lpszTerminationDigits: LPCWSTR;
  2425.     dwFirstDigitTimeout: DWORD;
  2426.     dwInterDigitTimeout: DWORD): LONG;
  2427.     stdcall;
  2428. {$ENDIF}
  2429.  
  2430. function lineGenerateDigits(
  2431.     hCall: HCALL;
  2432.     dwDigitMode: DWORD;
  2433.     lpszDigits: LPCSTR;
  2434.     dwDuration: DWORD): LONG;
  2435.     stdcall;
  2436.  
  2437. {$IFDEF Win32}
  2438. function lineGenerateDigitsA(
  2439.     hCall: HCALL;
  2440.     dwDigitMode: DWORD;
  2441.     lpszDigits: LPCSTR;
  2442.     dwDuration: DWORD): LONG;
  2443.     stdcall;
  2444.  
  2445. function lineGenerateDigitsW(
  2446.     hCall: HCALL;
  2447.     dwDigitMode: DWORD;
  2448.     lpszDigits: LPCWSTR;
  2449.     dwDuration: DWORD): LONG;
  2450.     stdcall;
  2451. {$ENDIF}
  2452.  
  2453. function lineGenerateTone(
  2454.     hCall: HCALL;
  2455.     dwToneMode: DWORD;
  2456.     dwDuration: DWORD;
  2457.     dwNumTones: DWORD;
  2458.     const lpTones: LPLINEGENERATETONE): LONG;
  2459.     stdcall;
  2460.  
  2461. function lineGetAddressCaps(
  2462.     hLineApp: HLINEAPP;
  2463.     dwDeviceID: DWORD;
  2464.     dwAddressID: DWORD;
  2465.     dwAPIVersion: DWORD;
  2466.     dwExtVersion: DWORD;
  2467.     lpAddressCaps: LPLINEADDRESSCAPS): LONG;
  2468.     stdcall;
  2469.  
  2470. {$IFDEF Win32}
  2471. function lineGetAddressCapsA(
  2472.     hLineApp: HLINEAPP;
  2473.     dwDeviceID: DWORD;
  2474.     dwAddressID: DWORD;
  2475.     dwAPIVersion: DWORD;
  2476.     dwExtVersion: DWORD;
  2477.     lpAddressCaps: LPLINEADDRESSCAPS): LONG;
  2478.     stdcall;
  2479.  
  2480. function lineGetAddressCapsW(
  2481.     hLineApp: HLINEAPP;
  2482.     dwDeviceID: DWORD;
  2483.     dwAddressID: DWORD;
  2484.     dwAPIVersion: DWORD;
  2485.     dwExtVersion: DWORD;
  2486.     lpAddressCaps: LPLINEADDRESSCAPS): LONG;
  2487.     stdcall;
  2488. {$ENDIF}
  2489.  
  2490. function lineGetAddressID(
  2491.     hLine: HLINE;
  2492.     lpdwAddressID: LPDWORD;
  2493.     dwAddressMode: DWORD;
  2494.     lpsAddress: LPCSTR;
  2495.     dwSize: DWORD): LONG;
  2496.     stdcall;
  2497.  
  2498. {$IFDEF Win32}
  2499. function lineGetAddressIDA(
  2500.     hLine: HLINE;
  2501.     lpdwAddressID: LPDWORD;
  2502.     dwAddressMode: DWORD;
  2503.     lpsAddress: LPCSTR;
  2504.     dwSize: DWORD): LONG;
  2505.     stdcall;
  2506.  
  2507. function lineGetAddressIDW(
  2508.     hLine: HLINE;
  2509.     lpdwAddressID: LPDWORD;
  2510.     dwAddressMode: DWORD;
  2511.     lpsAddress: LPCWSTR;
  2512.     dwSize: DWORD): LONG;
  2513.     stdcall;
  2514. {$ENDIF}
  2515.  
  2516. function lineGetAddressStatus(
  2517.     hLine: HLINE;
  2518.     dwAddressID: DWORD;
  2519.     lpAddressStatus: LPLINEADDRESSSTATUS): LONG;
  2520.     stdcall;
  2521.  
  2522. {$IFDEF Win32}
  2523. function lineGetAddressStatusA(
  2524.     hLine: HLINE;
  2525.     dwAddressID: DWORD;
  2526.     lpAddressStatus: LPLINEADDRESSSTATUS): LONG;
  2527.     stdcall;
  2528.  
  2529. function lineGetAddressStatusW(
  2530.     hLine: HLINE;
  2531.     dwAddressID: DWORD;
  2532.     lpAddressStatus: LPLINEADDRESSSTATUS): LONG;
  2533.     stdcall;
  2534. {$ENDIF}
  2535.  
  2536.  
  2537. {!! JEDI:bchoate:1997-11-11: Reorganized the following section to
  2538.  match the original header file (the whole $IFDEF span). }
  2539.  
  2540. {$IFDEF Tapi_Ver20_ORGREATER}
  2541. function lineGetAgentActivityList(                         {// TAPI v2.0}
  2542.     hLine: HLINE;
  2543.     dwAddressID: DWORD;
  2544.     lpAgentActivityList: LPLINEAGENTACTIVITYLIST): LONG;
  2545.     stdcall;
  2546.  
  2547. {$IFDEF Win32}
  2548. function lineGetAgentActivityListA(                        {// TAPI v2.0}
  2549.     hLine: HLINE;
  2550.     dwAddressID: DWORD;
  2551.     lpAgentActivityList: LPLINEAGENTACTIVITYLIST): LONG;
  2552.     stdcall;
  2553.  
  2554. function lineGetAgentActivityListW(                        {// TAPI v2.0}
  2555.     hLine: HLINE;
  2556.     dwAddressID: DWORD;
  2557.     lpAgentActivityList: LPLINEAGENTACTIVITYLIST): LONG;
  2558.     stdcall;
  2559. {$ENDIF}
  2560.  
  2561. function lineGetAgentCaps(                                 {// TAPI v2.0}
  2562.     hLineApp: HLINEAPP;
  2563.     dwDeviceID: DWORD;
  2564.     dwAddressID: DWORD;
  2565.     dwAppAPIVersion: DWORD;
  2566.     lpAgentCaps: LPLINEAGENTCAPS): LONG;
  2567.     stdcall;
  2568.  
  2569. {$IFDEF Win32}
  2570. function lineGetAgentCapsA(                                {// TAPI v2.0}
  2571.     hLineApp: HLINEAPP;
  2572.     dwDeviceID: DWORD;
  2573.     dwAddressID: DWORD;
  2574.     dwAppAPIVersion: DWORD;
  2575.     lpAgentCaps: LPLINEAGENTCAPS): LONG;
  2576.     stdcall;
  2577.  
  2578. function lineGetAgentCapsW(                                {// TAPI v2.0}
  2579.     hLineApp: HLINEAPP;
  2580.     dwDeviceID: DWORD;
  2581.     dwAddressID: DWORD;
  2582.     dwAppAPIVersion: DWORD;
  2583.     lpAgentCaps: LPLINEAGENTCAPS): LONG;
  2584.     stdcall;
  2585. {$ENDIF}
  2586.  
  2587. function lineGetAgentGroupList(                            {// TAPI v2.0}
  2588.     hLine: HLINE;
  2589.     dwAddressID: DWORD;
  2590.     lpAgentGroupList: LPLINEAGENTGROUPLIST): LONG;
  2591.     stdcall;
  2592.  
  2593. {$IFDEF Win32}
  2594. function lineGetAgentGroupListA(                           {// TAPI v2.0}
  2595.     hLine: HLINE;
  2596.     dwAddressID: DWORD;
  2597.     lpAgentGroupList: LPLINEAGENTGROUPLIST): LONG;
  2598.     stdcall;
  2599.  
  2600. function lineGetAgentGroupListW(                           {// TAPI v2.0}
  2601.     hLine: HLINE;
  2602.     dwAddressID: DWORD;
  2603.     lpAgentGroupList: LPLINEAGENTGROUPLIST): LONG;
  2604.     stdcall;
  2605. {$ENDIF}
  2606.  
  2607. function lineGetAgentStatus(                               {// TAPI v2.0}
  2608.     hLine: HLINE;
  2609.     dwAddressID: DWORD;
  2610.     lpAgentStatus: LPLINEAGENTSTATUS): LONG;
  2611.     stdcall;
  2612.  
  2613. {$IFDEF Win32}
  2614. function lineGetAgentStatusA(                              {// TAPI v2.0}
  2615.     hLine: HLINE;
  2616.     dwAddressID: DWORD;
  2617.     lpAgentStatus: LPLINEAGENTSTATUS): LONG;
  2618.     stdcall;
  2619.  
  2620. function lineGetAgentStatusW(                              {// TAPI v2.0}
  2621.     hLine: HLINE;
  2622.     dwAddressID: DWORD;
  2623.     lpAgentStatus: LPLINEAGENTSTATUS): LONG;
  2624.     stdcall;
  2625. {$ENDIF}
  2626. {$ENDIF}
  2627.  
  2628. function lineGetAppPriority(                               {// TAPI v1.4 :}
  2629.     lpszAppFilename: LPCSTR;
  2630.     dwMediaMode: DWORD;
  2631.     lpExtensionID: LPLINEEXTENSIONID;
  2632.     dwRequestMode: DWORD;
  2633.     lpExtensionName: LPVARSTRING;
  2634.     lpdwPriority: LPDWORD): LONG;
  2635.     stdcall;
  2636.  
  2637. {$IFDEF Win32}
  2638. function lineGetAppPriorityA(                              {// TAPI v1.4}
  2639.     lpszAppFilename: LPCSTR;
  2640.     dwMediaMode: DWORD;
  2641.     lpExtensionID: LPLINEEXTENSIONID;
  2642.     dwRequestMode: DWORD;
  2643.     lpExtensionName: LPVARSTRING;
  2644.     lpdwPriority: LPDWORD): LONG;
  2645.     stdcall;
  2646.  
  2647. function lineGetAppPriorityW(                              {// TAPI v1.4}
  2648.     lpszAppFilename: LPCWSTR;
  2649.     dwMediaMode: DWORD;
  2650.     lpExtensionID: LPLINEEXTENSIONID;
  2651.     dwRequestMode: DWORD;
  2652.     lpExtensionName: LPVARSTRING;
  2653.     lpdwPriority: LPDWORD): LONG;
  2654.     stdcall;
  2655. {$ENDIF}
  2656.  
  2657. function lineGetCallInfo(
  2658.     hCall: HCALL;
  2659.     lpCallInfo: LPLINECALLINFO): LONG;
  2660.     stdcall;
  2661.  
  2662. {$IFDEF Win32}
  2663. function lineGetCallInfoA(
  2664.     hCall: HCALL;
  2665.     lpCallInfo: LPLINECALLINFO): LONG;
  2666.     stdcall;
  2667.  
  2668. function lineGetCallInfoW(
  2669.     hCall: HCALL;
  2670.     lpCallInfo: LPLINECALLINFO): LONG;
  2671.     stdcall;
  2672. {$ENDIF}
  2673.  
  2674. function lineGetCallStatus(
  2675.     hCall: HCALL;
  2676.     lpCallStatus: LPLINECALLSTATUS): LONG;
  2677.     stdcall;
  2678.  
  2679. function lineGetConfRelatedCalls(
  2680.     hCall: HCALL;
  2681.     lpCallList: LPLINECALLLIST): LONG;
  2682.     stdcall;
  2683.  
  2684. function lineGetCountry(                                   {// TAPI v1.4}
  2685.     dwCountryID: DWORD;
  2686.     dwAPIVersion: DWORD;
  2687.     lpLineCountryList: LPLINECOUNTRYLIST): LONG;
  2688.     stdcall;
  2689.  
  2690. {$IFDEF Win32}
  2691. function lineGetCountryA(                                  {// TAPI v1.4}
  2692.     dwCountryID: DWORD;
  2693.     dwAPIVersion: DWORD;
  2694.     lpLineCountryList: LPLINECOUNTRYLIST): LONG;
  2695.     stdcall;
  2696.  
  2697. function lineGetCountryW(                                  {// TAPI v1.4}
  2698.     dwCountryID: DWORD;
  2699.     dwAPIVersion: DWORD;
  2700.     lpLineCountryList: LPLINECOUNTRYLIST): LONG;
  2701.     stdcall;
  2702. {$ENDIF}
  2703.  
  2704. function lineGetDevCaps(
  2705.     hLineApp: HLINEAPP;
  2706.     dwDeviceID: DWORD;
  2707.     dwAPIVersion: DWORD;
  2708.     dwExtVersion: DWORD;
  2709.     lpLineDevCaps: LPLINEDEVCAPS): LONG;
  2710.     stdcall;
  2711.  
  2712. {$IFDEF Win32}
  2713. function lineGetDevCapsA(
  2714.     hLineApp: HLINEAPP;
  2715.     dwDeviceID: DWORD;
  2716.     dwAPIVersion: DWORD;
  2717.     dwExtVersion: DWORD;
  2718.     lpLineDevCaps: LPLINEDEVCAPS): LONG;
  2719.     stdcall;
  2720.  
  2721. function lineGetDevCapsW(
  2722.     hLineApp: HLINEAPP;
  2723.     dwDeviceID: DWORD;
  2724.     dwAPIVersion: DWORD;
  2725.     dwExtVersion: DWORD;
  2726.     lpLineDevCaps: LPLINEDEVCAPS): LONG;
  2727.     stdcall;
  2728. {$ENDIF}
  2729.  
  2730. function lineGetDevConfig(
  2731.     dwDeviceID: DWORD;
  2732.     lpDeviceConfig: LPVARSTRING;
  2733.     lpszDeviceClass: LPCSTR): LONG;
  2734.     stdcall;
  2735.  
  2736. {$IFDEF Win32}
  2737. function lineGetDevConfigA(
  2738.     dwDeviceID: DWORD;
  2739.     lpDeviceConfig: LPVARSTRING;
  2740.     lpszDeviceClass: LPCSTR): LONG;
  2741.     stdcall;
  2742.  
  2743. function lineGetDevConfigW(
  2744.     dwDeviceID: DWORD;
  2745.     lpDeviceConfig: LPVARSTRING;
  2746.     lpszDeviceClass: LPCWSTR): LONG;
  2747.     stdcall;
  2748. {$ENDIF}
  2749.  
  2750. function lineGetNewCalls(
  2751.     hLine: HLINE;
  2752.     dwAddressID: DWORD;
  2753.     dwSelect: DWORD;
  2754.     lpCallList: LPLINECALLLIST): LONG;
  2755.     stdcall;
  2756.  
  2757. function lineGetIcon(
  2758.     dwDeviceID: DWORD;
  2759.     lpszDeviceClass: LPCSTR;
  2760.     lphIcon: LPHICON): LONG;
  2761.     stdcall;
  2762.  
  2763. {$IFDEF Win32}
  2764. function lineGetIconA(
  2765.     dwDeviceID: DWORD;
  2766.     lpszDeviceClass: LPCSTR;
  2767.     lphIcon: LPHICON): LONG;
  2768.     stdcall;
  2769.  
  2770. function lineGetIconW(
  2771.     dwDeviceID: DWORD;
  2772.     lpszDeviceClass: LPCWSTR;
  2773.     lphIcon: LPHICON): LONG;
  2774.     stdcall;
  2775. {$ENDIF}
  2776.  
  2777. function lineGetID(
  2778.     hLine: HLINE;
  2779.     dwAddressID: DWORD;
  2780.     hCall: HCALL;
  2781.     dwSelect: DWORD;
  2782.     lpDeviceID: LPVARSTRING;
  2783.     lpszDeviceClass: LPCSTR): LONG;
  2784.     stdcall;
  2785.  
  2786. {$IFDEF Win32}
  2787. function lineGetIDA(
  2788.     hLine: HLINE;
  2789.     dwAddressID: DWORD;
  2790.     hCall: HCALL;
  2791.     dwSelect: DWORD;
  2792.     lpDeviceID: LPVARSTRING;
  2793.     lpszDeviceClass: LPCSTR): LONG;
  2794.     stdcall;
  2795.  
  2796. function lineGetIDW(
  2797.     hLine: HLINE;
  2798.     dwAddressID: DWORD;
  2799.     hCall: HCALL;
  2800.     dwSelect: DWORD;
  2801.     lpDeviceID: LPVARSTRING;
  2802.     lpszDeviceClass: LPCWSTR): LONG;
  2803.     stdcall;
  2804. {$ENDIF}
  2805.  
  2806. function lineGetLineDevStatus(
  2807.     hLine: HLINE;
  2808.     lpLineDevStatus: LPLINEDEVSTATUS): LONG;
  2809.     stdcall;
  2810.  
  2811. {$IFDEF Win32}
  2812. function lineGetLineDevStatusA(
  2813.     hLine: HLINE;
  2814.     lpLineDevStatus: LPLINEDEVSTATUS): LONG;
  2815.     stdcall;
  2816.  
  2817. function lineGetLineDevStatusW(
  2818.     hLine: HLINE;
  2819.     lpLineDevStatus: LPLINEDEVSTATUS): LONG;
  2820.     stdcall;
  2821. {$ENDIF}
  2822.  
  2823. {$IFDEF Tapi_Ver20_ORGREATER}
  2824. function lineGetMessage(                                   {// TAPI v2.0}
  2825.     hLineApp: HLINEAPP;
  2826.     lpMessage: LPLINEMESSAGE;
  2827.     dwTimeout: DWORD): LONG;
  2828.     stdcall;
  2829. {$ENDIF}
  2830.  
  2831. function lineGetNumRings(
  2832.     hLine: HLINE;
  2833.     dwAddressID: DWORD;
  2834.     lpdwNumRings: LPDWORD): LONG;
  2835.     stdcall;
  2836.  
  2837. function lineGetProviderList(                              {// TAPI v1.4}
  2838.     dwAPIVersion: DWORD;
  2839.     lpProviderList: LPLINEPROVIDERLIST): LONG;
  2840.     stdcall;
  2841.  
  2842. {$IFDEF Win32}
  2843. function lineGetProviderListA(
  2844.     dwAPIVersion: DWORD;
  2845.     lpProviderList: LPLINEPROVIDERLIST): LONG;
  2846.     stdcall;
  2847.  
  2848. function lineGetProviderListW(
  2849.     dwAPIVersion: DWORD;
  2850.     lpProviderList: LPLINEPROVIDERLIST): LONG;
  2851.     stdcall;
  2852. {$ENDIF}
  2853.  
  2854. function lineGetRequest(
  2855.     hLineApp: HLINEAPP;
  2856.     dwRequestMode: DWORD;
  2857.     lpRequestBuffer: LPVOID): LONG;
  2858.     stdcall;
  2859.  
  2860. {$IFDEF Win32}
  2861. function lineGetRequestA(
  2862.     hLineApp: HLINEAPP;
  2863.     dwRequestMode: DWORD;
  2864.     lpRequestBuffer: LPVOID): LONG;
  2865.     stdcall;
  2866.  
  2867. function lineGetRequestW(
  2868.     hLineApp: HLINEAPP;
  2869.     dwRequestMode: DWORD;
  2870.     lpRequestBuffer: LPVOID): LONG;
  2871.     stdcall;
  2872. {$ENDIF}
  2873.  
  2874. function lineGetStatusMessages(
  2875.     hLine: HLINE;
  2876.     lpdwLineStates: LPDWORD;
  2877.     lpdwAddressStates: LPDWORD): LONG;
  2878.     stdcall;
  2879.  
  2880. function lineGetTranslateCaps(
  2881.     hLineApp: HLINEAPP;
  2882.     dwAPIVersion: DWORD;
  2883.     lpTranslateCaps: LPLINETRANSLATECAPS): LONG;
  2884.     stdcall;
  2885.  
  2886. {$IFDEF Win32}
  2887. function lineGetTranslateCapsA(
  2888.     hLineApp: HLINEAPP;
  2889.     dwAPIVersion: DWORD;
  2890.     lpTranslateCaps: LPLINETRANSLATECAPS): LONG;
  2891.     stdcall;
  2892.  
  2893. function lineGetTranslateCapsW(
  2894.     hLineApp: HLINEAPP;
  2895.     dwAPIVersion: DWORD;
  2896.     lpTranslateCaps: LPLINETRANSLATECAPS): LONG;
  2897.     stdcall;
  2898. {$ENDIF}
  2899.  
  2900. function lineHandoff(
  2901.     hCall: HCALL;
  2902.     lpszFileName: LPCSTR;
  2903.     dwMediaMode: DWORD): LONG;
  2904.     stdcall;
  2905.  
  2906. {$IFDEF Win32}
  2907. function lineHandoffA(
  2908.     hCall: HCALL;
  2909.     lpszFileName: LPCSTR;
  2910.     dwMediaMode: DWORD): LONG;
  2911.     stdcall;
  2912.  
  2913. function lineHandoffW(
  2914.     hCall: HCALL;
  2915.     lpszFileName: LPCWSTR;
  2916.     dwMediaMode: DWORD): LONG;
  2917.     stdcall;
  2918. {$ENDIF}
  2919.  
  2920. function lineHold(
  2921.     hCall: HCALL): LONG;
  2922.     stdcall;
  2923.  
  2924. function lineInitialize(
  2925.     lphLineApp: LPHLINEAPP;
  2926.     hInstance: HINST;
  2927.     lpfnCallback: TLINECALLBACK;
  2928.     lpszAppName: LPCSTR;
  2929.     lpdwNumDevs: LPDWORD): LONG;
  2930.     stdcall;
  2931.  
  2932. {!! JEDI:bchoate:1997-11-11: Reorganized the following section to
  2933.  match the original header file (the whole $IFDEF span). }
  2934.  
  2935. {$IFDEF Tapi_Ver20_ORGREATER}
  2936. function lineInitializeEx(                                 {// TAPI v2.0}
  2937.     lphLineApp: LPHLINEAPP;
  2938.     hInstance: HINST;
  2939.     lpfnCallback: TLINECALLBACK;
  2940.     lpszFriendlyAppName: LPCSTR;
  2941.     lpdwNumDevs: LPDWORD;
  2942.     lpdwAPIVersion: LPDWORD;
  2943.     lpLineInitializeExParams: LPLINEINITIALIZEEXPARAMS): LONG;
  2944.     stdcall;
  2945.  
  2946. {$IFDEF Win32}
  2947. function lineInitializeExA(                                {// TAPI v2.0}
  2948.     lphLineApp: LPHLINEAPP;
  2949.     hInstance: HINST;
  2950.     lpfnCallback: TLINECALLBACK;
  2951.     lpszFriendlyAppName: LPCSTR;
  2952.     lpdwNumDevs: LPDWORD;
  2953.     lpdwAPIVersion: LPDWORD;
  2954.     lpLineInitializeExParams: LPLINEINITIALIZEEXPARAMS): LONG;
  2955.     stdcall;
  2956.  
  2957. function lineInitializeExW(                                {// TAPI v2.0}
  2958.     lphLineApp: LPHLINEAPP;
  2959.     hInstance: HINST;
  2960.     lpfnCallback: TLINECALLBACK;
  2961.     lpszFriendlyAppName: LPCWSTR;
  2962.     lpdwNumDevs: LPDWORD;
  2963.     lpdwAPIVersion: LPDWORD;
  2964.     lpLineInitializeExParams: LPLINEINITIALIZEEXPARAMS): LONG;
  2965.     stdcall;
  2966. {$ENDIF}
  2967. {$ENDIF}
  2968.  
  2969. function lineMakeCall(
  2970.     hLine: HLINE;
  2971.     lphCall: LPHCALL;
  2972.     lpszDestAddress: LPCSTR;
  2973.     dwCountryCode: DWORD;
  2974.     const lpCallParams: LPLINECALLPARAMS): LONG;
  2975.     stdcall;
  2976.  
  2977. {$IFDEF Win32}
  2978. function lineMakeCallA(
  2979.     hLine: HLINE;
  2980.     lphCall: LPHCALL;
  2981.     lpszDestAddress: LPCSTR;
  2982.     dwCountryCode: DWORD;
  2983.     const lpCallParams: LPLINECALLPARAMS): LONG;
  2984.     stdcall;
  2985.  
  2986. function lineMakeCallW(
  2987.     hLine: HLINE;
  2988.     lphCall: LPHCALL;
  2989.     lpszDestAddress: LPCWSTR;
  2990.     dwCountryCode: DWORD;
  2991.     const lpCallParams: LPLINECALLPARAMS): LONG;
  2992.     stdcall;
  2993. {$ENDIF}
  2994.  
  2995. function lineMonitorDigits(
  2996.     hCall: HCALL;
  2997.     dwDigitModes: DWORD): LONG;
  2998.     stdcall;
  2999.  
  3000. function lineMonitorMedia(
  3001.     hCall: HCALL;
  3002.     dwMediaModes: DWORD): LONG;
  3003.     stdcall;
  3004.  
  3005. function lineMonitorTones(
  3006.     hCall: HCALL;
  3007.     const lpToneList: LPLINEMONITORTONE;
  3008.     dwNumEntries: DWORD): LONG;
  3009.     stdcall;
  3010.  
  3011. function lineNegotiateAPIVersion(
  3012.     hLineApp: HLINEAPP;
  3013.     dwDeviceID: DWORD;
  3014.     dwAPILowVersion: DWORD;
  3015.     dwAPIHighVersion: DWORD;
  3016.     lpdwAPIVersion: LPDWORD;
  3017.     lpExtensionID: LPLINEEXTENSIONID): LONG;
  3018.     stdcall;
  3019.  
  3020. function lineNegotiateExtVersion(
  3021.     hLineApp: HLINEAPP;
  3022.     dwDeviceID: DWORD;
  3023.     dwAPIVersion: DWORD;
  3024.     dwExtLowVersion: DWORD;
  3025.     dwExtHighVersion: DWORD;
  3026.     lpdwExtVersion: LPDWORD): LONG;
  3027.     stdcall;
  3028.  
  3029. function lineOpen(
  3030.     hLineApp: HLINEAPP;
  3031.     dwDeviceID: DWORD;
  3032.     lphLine: LPHLINE;
  3033.     dwAPIVersion: DWORD;
  3034.     dwExtVersion: DWORD;
  3035.     dwCallbackInstance: DWORD;
  3036.     dwPrivileges: DWORD;
  3037.     dwMediaModes: DWORD;
  3038.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3039.     stdcall;
  3040.  
  3041. {$IFDEF Win32}
  3042. function lineOpenA(
  3043.     hLineApp: HLINEAPP;
  3044.     dwDeviceID: DWORD;
  3045.     lphLine: LPHLINE;
  3046.     dwAPIVersion: DWORD;
  3047.     dwExtVersion: DWORD;
  3048.     dwCallbackInstance: DWORD;
  3049.     dwPrivileges: DWORD;
  3050.     dwMediaModes: DWORD;
  3051.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3052.     stdcall;
  3053.  
  3054. function lineOpenW(
  3055.     hLineApp: HLINEAPP;
  3056.     dwDeviceID: DWORD;
  3057.     lphLine: LPHLINE;
  3058.     dwAPIVersion: DWORD;
  3059.     dwExtVersion: DWORD;
  3060.     dwCallbackInstance: DWORD;
  3061.     dwPrivileges: DWORD;
  3062.     dwMediaModes: DWORD;
  3063.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3064.     stdcall;
  3065. {$ENDIF}
  3066.  
  3067. function linePark(
  3068.     hCall: HCALL;
  3069.     dwParkMode: DWORD;
  3070.     lpszDirAddress: LPCSTR;
  3071.     lpNonDirAddress: LPVARSTRING): LONG;
  3072.     stdcall;
  3073.  
  3074. {$IFDEF Win32}
  3075. function lineParkA(
  3076.     hCall: HCALL;
  3077.     dwParkMode: DWORD;
  3078.     lpszDirAddress: LPCSTR;
  3079.     lpNonDirAddress: LPVARSTRING): LONG;
  3080.     stdcall;
  3081.  
  3082. function lineParkW(
  3083.     hCall: HCALL;
  3084.     dwParkMode: DWORD;
  3085.     lpszDirAddress: LPCWSTR;
  3086.     lpNonDirAddress: LPVARSTRING): LONG;
  3087.     stdcall;
  3088. {$ENDIF}
  3089.  
  3090. function linePickup(
  3091.     hLine: HLINE;
  3092.     dwAddressID: DWORD;
  3093.     lphCall: LPHCALL;
  3094.     lpszDestAddress: LPCSTR;
  3095.     lpszGroupID: LPCSTR): LONG;
  3096.     stdcall;
  3097.  
  3098. {$IFDEF Win32}
  3099. function linePickupA(
  3100.     hLine: HLINE;
  3101.     dwAddressID: DWORD;
  3102.     lphCall: LPHCALL;
  3103.     lpszDestAddress: LPCSTR;
  3104.     lpszGroupID: LPCSTR): LONG;
  3105.     stdcall;
  3106.  
  3107. function linePickupW(
  3108.     hLine: HLINE;
  3109.     dwAddressID: DWORD;
  3110.     lphCall: LPHCALL;
  3111.     lpszDestAddress: LPCWSTR;
  3112.     lpszGroupID: LPCWSTR): LONG;
  3113.     stdcall;
  3114. {$ENDIF}
  3115.  
  3116. function linePrepareAddToConference(
  3117.     hConfCall: HCALL;
  3118.     lphConsultCall: LPHCALL;
  3119.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3120.     stdcall;
  3121.  
  3122. {$IFDEF Win32}
  3123. function linePrepareAddToConferenceA(
  3124.     hConfCall: HCALL;
  3125.     lphConsultCall: LPHCALL;
  3126.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3127.     stdcall;
  3128.  
  3129. function linePrepareAddToConferenceW(
  3130.     hConfCall: HCALL;
  3131.     lphConsultCall: LPHCALL;
  3132.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3133.     stdcall;
  3134. {$ENDIF}
  3135.  
  3136. {$IFDEF Tapi_Ver20_ORGREATER}
  3137. function lineProxyMessage(                                 {// TAPI v2.0}
  3138.     hLine: HLINE;
  3139.     hCall: HCALL;
  3140.     dwMsg: DWORD;
  3141.     dwParam1: DWORD;
  3142.     dwParam2: DWORD;
  3143.     dwParam3: DWORD): LONG;
  3144.     stdcall;
  3145.  
  3146. function lineProxyResponse(                                {// TAPI v2.0}
  3147.     hLine: HLINE;
  3148.     lpProxyRequest: LPLINEPROXYREQUEST;
  3149.     dwResult: DWORD): LONG;
  3150.     stdcall;
  3151. {$ENDIF}
  3152.  
  3153. function lineRedirect(
  3154.     hCall: HCALL;
  3155.     lpszDestAddress: LPCSTR;
  3156.     dwCountryCode: DWORD): LONG;
  3157.     stdcall;
  3158.  
  3159. {$IFDEF Win32}
  3160. function lineRedirectA(
  3161.     hCall: HCALL;
  3162.     lpszDestAddress: LPCSTR;
  3163.     dwCountryCode: DWORD): LONG;
  3164.     stdcall;
  3165.  
  3166. function lineRedirectW(
  3167.     hCall: HCALL;
  3168.     lpszDestAddress: LPCWSTR;
  3169.     dwCountryCode: DWORD): LONG;
  3170.     stdcall;
  3171. {$ENDIF}
  3172.  
  3173. function lineRegisterRequestRecipient(
  3174.     hLineApp: HLINEAPP;
  3175.     dwRegistrationInstance: DWORD;
  3176.     dwRequestMode: DWORD;
  3177.     bEnable: DWORD): LONG;
  3178.     stdcall;
  3179.  
  3180. function lineReleaseUserUserInfo(                          {// TAPI v1.4}
  3181.     hCall: HCALL): LONG;
  3182.     stdcall;
  3183.  
  3184. function lineRemoveFromConference(
  3185.     hCall: HCALL): LONG;
  3186.     stdcall;
  3187.  
  3188. function lineRemoveProvider(                               {// TAPI v1.4}
  3189.     dwPermanentProviderID: DWORD;
  3190.     hwndOwner: HWND): LONG;
  3191.     stdcall;
  3192.  
  3193. function lineSecureCall(
  3194.     hCall: HCALL): LONG;
  3195.     stdcall;
  3196.  
  3197. function lineSendUserUserInfo(
  3198.     hCall: HCALL;
  3199.     lpsUserUserInfo: LPCSTR;
  3200.     dwSize: DWORD): LONG;
  3201.     stdcall;
  3202.  
  3203. {$IFDEF Tapi_Ver20_ORGREATER}
  3204. function lineSetAgentActivity(                             {// TAPI v2.0}
  3205.     hLine: HLINE;
  3206.     dwAddressID: DWORD;
  3207.     dwActivityID: DWORD): LONG;
  3208.     stdcall;
  3209.  
  3210. function lineSetAgentGroup(                                {// TAPI v2.0}
  3211.     hLine: HLINE;
  3212.     dwAddressID: DWORD;
  3213.     lpAgentGroupList: LPLINEAGENTGROUPLIST): LONG;
  3214.     stdcall;
  3215.  
  3216. function lineSetAgentState(                                {// TAPI v2.0}
  3217.     hLine: HLINE;
  3218.     dwAddressID: DWORD;
  3219.     dwAgentState: DWORD;
  3220.     dwNextAgentState: DWORD): LONG;
  3221.     stdcall;
  3222. {$ENDIF}
  3223.  
  3224. function lineSetAppPriority(                               {// TAPI v1.4}
  3225.     lpszAppFilename: LPCSTR;
  3226.     dwMediaMode: DWORD;
  3227.     lpExtensionID: LPLINEEXTENSIONID;
  3228.     dwRequestMode: DWORD;
  3229.     lpszExtensionName: LPCSTR;
  3230.     dwPriority: DWORD): LONG;
  3231.     stdcall;
  3232.  
  3233. {$IFDEF Win32}
  3234. function lineSetAppPriorityA(                              {// TAPI v1.4}
  3235.     lpszAppFilename: LPCSTR;
  3236.     dwMediaMode: DWORD;
  3237.     lpExtensionID: LPLINEEXTENSIONID;
  3238.     dwRequestMode: DWORD;
  3239.     lpszExtensionName: LPCSTR;
  3240.     dwPriority: DWORD): LONG;
  3241.     stdcall;
  3242.  
  3243. function lineSetAppPriorityW(                              {// TAPI v1.4}
  3244.     lpszAppFilename: LPCWSTR;
  3245.     dwMediaMode: DWORD;
  3246.     lpExtensionID: LPLINEEXTENSIONID;
  3247.     dwRequestMode: DWORD;
  3248.     lpszExtensionName: LPCWSTR;
  3249.     dwPriority: DWORD): LONG;
  3250.     stdcall;
  3251. {$ENDIF}
  3252.  
  3253. function lineSetAppSpecific(
  3254.     hCall: HCALL;
  3255.     dwAppSpecific: DWORD): LONG;
  3256.     stdcall;
  3257.  
  3258. {$IFDEF Tapi_Ver20_ORGREATER}
  3259. function lineSetCallData(                                  {// TAPI v2.0}
  3260.     hCall: HCALL;
  3261.     lpCallData: LPVOID;
  3262.     dwSize: DWORD): LONG;
  3263.     stdcall;
  3264. {$ENDIF}
  3265.  
  3266. function lineSetCallParams(
  3267.     hCall: HCALL;
  3268.     dwBearerMode: DWORD;
  3269.     dwMinRate: DWORD;
  3270.     dwMaxRate: DWORD;
  3271.     const lpDialParams: LPLINEDIALPARAMS): LONG;
  3272.     stdcall;
  3273.  
  3274. function lineSetCallPrivilege(
  3275.     hCall: HCALL;
  3276.     dwCallPrivilege: DWORD): LONG;
  3277.     stdcall;
  3278.  
  3279. {$IFDEF Tapi_Ver20_ORGREATER}
  3280. function lineSetCallQualityOfService(                      {// TAPI v2.0}
  3281.     hCall: HCALL;
  3282.     lpSendingFlowspec: LPVOID;
  3283.     dwSendingFlowspecSize: DWORD;
  3284.     lpReceivingFlowspec: LPVOID;
  3285.     dwReceivingFlowspecSize: DWORD): LONG;
  3286.     stdcall;
  3287.  
  3288. function lineSetCallTreatment(                             {// TAPI v2.0}
  3289.     hCall: HCALL;
  3290.     dwTreatment: DWORD): LONG;
  3291.     stdcall;
  3292. {$ENDIF}
  3293.  
  3294. function lineSetCurrentLocation(
  3295.     hLineApp: HLINEAPP;
  3296.     dwLocation: DWORD): LONG;
  3297.     stdcall;
  3298.  
  3299. function lineSetDevConfig(
  3300.     dwDeviceID: DWORD;
  3301.     const lpDeviceConfig: LPVOID;
  3302.     dwSize: DWORD;
  3303.     lpszDeviceClass: LPCSTR): LONG;
  3304.     stdcall;
  3305.  
  3306. {$IFDEF Win32}
  3307. function lineSetDevConfigA(
  3308.     dwDeviceID: DWORD;
  3309.     const lpDeviceConfig: LPVOID;
  3310.     dwSize: DWORD;
  3311.     lpszDeviceClass: LPCSTR): LONG;
  3312.     stdcall;
  3313.  
  3314. function lineSetDevConfigW(
  3315.     dwDeviceID: DWORD;
  3316.     const lpDeviceConfig: LPVOID;
  3317.     dwSize: DWORD;
  3318.     lpszDeviceClass: LPCWSTR): LONG;
  3319.     stdcall;
  3320. {$ENDIF}
  3321.  
  3322. {$IFDEF Tapi_Ver20_ORGREATER}
  3323. function lineSetLineDevStatus(                             {// TAPI v2.0}
  3324.     hLine: HLINE;
  3325.     dwStatusToChange: DWORD;
  3326.     fStatus: DWORD): LONG;
  3327.     stdcall;
  3328. {$ENDIF}
  3329.  
  3330. function lineSetMediaControl(
  3331.     hLine: HLINE;
  3332.     dwAddressID: DWORD;
  3333.     hCall: HCALL;
  3334.     dwSelect: DWORD;
  3335.     const lpDigitList: LPLINEMEDIACONTROLDIGIT;
  3336.     dwDigitNumEntries: DWORD;
  3337.     const lpMediaList: LPLINEMEDIACONTROLMEDIA;
  3338.     dwMediaNumEntries: DWORD;
  3339.     const lpToneList: LPLINEMEDIACONTROLTONE;
  3340.     dwToneNumEntries: DWORD;
  3341.     const lpCallStateList: LPLINEMEDIACONTROLCALLSTATE;
  3342.     dwCallStateNumEntries: DWORD): LONG;
  3343.     stdcall;
  3344.  
  3345. function lineSetMediaMode(
  3346.     hCall: HCALL;
  3347.     dwMediaModes: DWORD): LONG;
  3348.     stdcall;
  3349.  
  3350. function lineSetNumRings(
  3351.     hLine: HLINE;
  3352.     dwAddressID: DWORD;
  3353.     dwNumRings: DWORD): LONG;
  3354.     stdcall;
  3355.  
  3356. function lineSetStatusMessages(
  3357.     hLine: HLINE;
  3358.     dwLineStates: DWORD;
  3359.     dwAddressStates: DWORD): LONG;
  3360.     stdcall;
  3361.  
  3362. function lineSetTerminal(
  3363.     hLine: HLINE;
  3364.     dwAddressID: DWORD;
  3365.     hCall: HCALL;
  3366.     dwSelect: DWORD;
  3367.     dwTerminalModes: DWORD;
  3368.     dwTerminalID: DWORD;
  3369.     bEnable: DWORD): LONG;
  3370.     stdcall;
  3371.  
  3372. function lineSetTollList(
  3373.     hLineApp: HLINEAPP;
  3374.     dwDeviceID: DWORD;
  3375.     lpszAddressIn: LPCSTR;
  3376.     dwTollListOption: DWORD): LONG;
  3377.     stdcall;
  3378.  
  3379. {$IFDEF Win32}
  3380. function lineSetTollListA(
  3381.     hLineApp: HLINEAPP;
  3382.     dwDeviceID: DWORD;
  3383.     lpszAddressIn: LPCSTR;
  3384.     dwTollListOption: DWORD): LONG;
  3385.     stdcall;
  3386.  
  3387. function lineSetTollListW(
  3388.     hLineApp: HLINEAPP;
  3389.     dwDeviceID: DWORD;
  3390.     lpszAddressInW: LPCWSTR;
  3391.     dwTollListOption: DWORD): LONG;
  3392.     stdcall;
  3393. {$ENDIF}
  3394.  
  3395. function lineSetupConference(
  3396.     hCall: HCALL;
  3397.     hLine: HLINE;
  3398.     lphConfCall: LPHCALL;
  3399.     lphConsultCall: LPHCALL;
  3400.     dwNumParties: DWORD;
  3401.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3402.     stdcall;
  3403.  
  3404. {$IFDEF Win32}
  3405. function lineSetupConferenceA(
  3406.     hCall: HCALL;
  3407.     hLine: HLINE;
  3408.     lphConfCall: LPHCALL;
  3409.     lphConsultCall: LPHCALL;
  3410.     dwNumParties: DWORD;
  3411.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3412.     stdcall;
  3413.  
  3414. function lineSetupConferenceW(
  3415.     hCall: HCALL;
  3416.     hLine: HLINE;
  3417.     lphConfCall: LPHCALL;
  3418.     lphConsultCall: LPHCALL;
  3419.     dwNumParties: DWORD;
  3420.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3421.     stdcall;
  3422. {$ENDIF}
  3423.  
  3424. function lineSetupTransfer(
  3425.     hCall: HCALL;
  3426.     lphConsultCall: LPHCALL;
  3427.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3428.     stdcall;
  3429.  
  3430. {$IFDEF Win32}
  3431. function lineSetupTransferA(
  3432.     hCall: HCALL;
  3433.     lphConsultCall: LPHCALL;
  3434.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3435.     stdcall;
  3436.  
  3437. function lineSetupTransferW(
  3438.     hCall: HCALL;
  3439.     lphConsultCall: LPHCALL;
  3440.     const lpCallParams: LPLINECALLPARAMS): LONG;
  3441.     stdcall;
  3442. {$ENDIF}
  3443.  
  3444. function lineShutdown(
  3445.     hLineApp: HLINEAPP): LONG;
  3446.     stdcall;
  3447.  
  3448. function lineSwapHold(
  3449.     hActiveCall: HCALL;
  3450.     hHeldCall: HCALL): LONG;
  3451.     stdcall;
  3452.  
  3453. function lineTranslateAddress(
  3454.     hLineApp: HLINEAPP;
  3455.     dwDeviceID: DWORD;
  3456.     dwAPIVersion: DWORD;
  3457.     lpszAddressIn: LPCSTR;
  3458.     dwCard: DWORD;
  3459.     dwTranslateOptions: DWORD;
  3460.     lpTranslateOutput: LPLINETRANSLATEOUTPUT): LONG;
  3461.     stdcall;
  3462.  
  3463. {$IFDEF Win32}
  3464. function lineTranslateAddressA(
  3465.     hLineApp: HLINEAPP;
  3466.     dwDeviceID: DWORD;
  3467.     dwAPIVersion: DWORD;
  3468.     lpszAddressIn: LPCSTR;
  3469.     dwCard: DWORD;
  3470.     dwTranslateOptions: DWORD;
  3471.     lpTranslateOutput: LPLINETRANSLATEOUTPUT): LONG;
  3472.     stdcall;
  3473.  
  3474. function lineTranslateAddressW(
  3475.     hLineApp: HLINEAPP;
  3476.     dwDeviceID: DWORD;
  3477.     dwAPIVersion: DWORD;
  3478.     lpszAddressIn: LPCWSTR;
  3479.     dwCard: DWORD;
  3480.     dwTranslateOptions: DWORD;
  3481.     lpTranslateOutput: LPLINETRANSLATEOUTPUT): LONG;
  3482.     stdcall;
  3483. {$ENDIF}
  3484.  
  3485. function lineTranslateDialog(                              {// TAPI v1.4}
  3486.     hLineApp: HLINEAPP;
  3487.     dwDeviceID: DWORD;
  3488.     dwAPIVersion: DWORD;
  3489.     hwndOwner: HWND;
  3490.     lpszAddressIn: LPCSTR): LONG;
  3491.     stdcall;
  3492.  
  3493. {$IFDEF Win32}
  3494. function lineTranslateDialogA(                             {// TAPI v1.4}
  3495.     hLineApp: HLINEAPP;
  3496.     dwDeviceID: DWORD;
  3497.     dwAPIVersion: DWORD;
  3498.     hwndOwner: HWND;
  3499.     lpszAddressIn: LPCSTR): LONG;
  3500.     stdcall;
  3501.  
  3502. function lineTranslateDialogW(
  3503.     hLineApp: HLINEAPP;
  3504.     dwDeviceID: DWORD;
  3505.     dwAPIVersion: DWORD;
  3506.     hwndOwner: HWND;
  3507.     lpszAddressIn: LPCWSTR): LONG;
  3508.     stdcall;
  3509. {$ENDIF}
  3510.  
  3511. function lineUncompleteCall(
  3512.     hLine: HLINE;
  3513.     dwCompletionID: DWORD): LONG;
  3514.     stdcall;
  3515.  
  3516. function lineUnhold(
  3517.     hCall: HCALL): LONG;
  3518.     stdcall;
  3519.  
  3520. function lineUnpark(
  3521.     hLine: HLINE;
  3522.     dwAddressID: DWORD;
  3523.     lphCall: LPHCALL;
  3524.     lpszDestAddress: LPCSTR): LONG;
  3525.     stdcall;
  3526.  
  3527. {$IFDEF Win32}
  3528. function lineUnparkA(
  3529.     hLine: HLINE;
  3530.     dwAddressID: DWORD;
  3531.     lphCall: LPHCALL;
  3532.     lpszDestAddress: LPCSTR): LONG;
  3533.     stdcall;
  3534.  
  3535. function lineUnparkW(
  3536.     hLine: HLINE;
  3537.     dwAddressID: DWORD;
  3538.     lphCall: LPHCALL;
  3539.     lpszDestAddress: LPCWSTR): LONG;
  3540.     stdcall;
  3541. {$ENDIF}
  3542.  
  3543. function phoneClose(
  3544.     hPhone: HPHONE): LONG;
  3545.     stdcall;
  3546.  
  3547. function phoneConfigDialog(
  3548.     dwDeviceID: DWORD;
  3549.     hwndOwner: HWND;
  3550.     lpszDeviceClass: LPCSTR): LONG;
  3551.     stdcall;
  3552.  
  3553. {$IFDEF Win32}
  3554. function phoneConfigDialogA(
  3555.     dwDeviceID: DWORD;
  3556.     hwndOwner: HWND;
  3557.     lpszDeviceClass: LPCSTR): LONG;
  3558.     stdcall;
  3559.  
  3560. function phoneConfigDialogW(
  3561.     dwDeviceID: DWORD;
  3562.     hwndOwner: HWND;
  3563.     lpszDeviceClass: LPCWSTR): LONG;
  3564.     stdcall;
  3565. {$ENDIF}
  3566.  
  3567. function phoneDevSpecific(
  3568.     hPhone: HPHONE;
  3569.     lpParams: LPVOID;
  3570.     dwSize: DWORD): LONG;
  3571.     stdcall;
  3572.  
  3573. function phoneGetButtonInfo(
  3574.     hPhone: HPHONE;
  3575.     dwButtonLampID: DWORD;
  3576.     lpButtonInfo: LPPHONEBUTTONINFO): LONG;
  3577.     stdcall;
  3578.  
  3579. {$IFDEF Win32}
  3580. function phoneGetButtonInfoA(
  3581.     hPhone: HPHONE;
  3582.     dwButtonLampID: DWORD;
  3583.     lpButtonInfo: LPPHONEBUTTONINFO): LONG;
  3584.     stdcall;
  3585.  
  3586. function phoneGetButtonInfoW(
  3587.     hPhone: HPHONE;
  3588.     dwButtonLampID: DWORD;
  3589.     lpButtonInfo: LPPHONEBUTTONINFO): LONG;
  3590.     stdcall;
  3591. {$ENDIF}
  3592.  
  3593. function phoneGetData(
  3594.     hPhone: HPHONE;
  3595.     dwDataID: DWORD;
  3596.     lpData: LPVOID;
  3597.     dwSize: DWORD): LONG;
  3598.     stdcall;
  3599.  
  3600. function phoneGetDevCaps(
  3601.     hPhoneApp: HPHONEAPP;
  3602.     dwDeviceID: DWORD;
  3603.     dwAPIVersion: DWORD;
  3604.     dwExtVersion: DWORD;
  3605.     lpPhoneCaps: LPPHONECAPS): LONG;
  3606.     stdcall;
  3607.  
  3608. {$IFDEF Win32}
  3609. function phoneGetDevCapsA(
  3610.     hPhoneApp: HPHONEAPP;
  3611.     dwDeviceID: DWORD;
  3612.     dwAPIVersion: DWORD;
  3613.     dwExtVersion: DWORD;
  3614.     lpPhoneCaps: LPPHONECAPS): LONG;
  3615.     stdcall;
  3616.  
  3617. function phoneGetDevCapsW(
  3618.     hPhoneApp: HPHONEAPP;
  3619.     dwDeviceID: DWORD;
  3620.     dwAPIVersion: DWORD;
  3621.     dwExtVersion: DWORD;
  3622.     lpPhoneCaps: LPPHONECAPS): LONG;
  3623.     stdcall;
  3624. {$ENDIF}
  3625.  
  3626. function phoneGetDisplay(
  3627.     hPhone: HPHONE;
  3628.     lpDisplay: LPVARSTRING): LONG;
  3629.     stdcall;
  3630.  
  3631. function phoneGetGain(
  3632.     hPhone: HPHONE;
  3633.     dwHookSwitchDev: DWORD;
  3634.     lpdwGain: LPDWORD): LONG;
  3635.     stdcall;
  3636.  
  3637. function phoneGetHookSwitch(
  3638.     hPhone: HPHONE;
  3639.     lpdwHookSwitchDevs: LPDWORD): LONG;
  3640.     stdcall;
  3641.  
  3642. function phoneGetIcon(
  3643.     dwDeviceID: DWORD;
  3644.     lpszDeviceClass: LPCSTR;
  3645.     lphIcon: LPHICON): LONG;
  3646.     stdcall;
  3647.  
  3648. {$IFDEF Win32}
  3649. function phoneGetIconA(
  3650.     dwDeviceID: DWORD;
  3651.     lpszDeviceClass: LPCSTR;
  3652.     lphIcon: LPHICON): LONG;
  3653.     stdcall;
  3654.  
  3655. function phoneGetIconW(
  3656.     dwDeviceID: DWORD;
  3657.     lpszDeviceClass: LPCWSTR;
  3658.     lphIcon: LPHICON): LONG;
  3659.     stdcall;
  3660. {$ENDIF}
  3661.  
  3662. function phoneGetID(
  3663.     hPhone: HPHONE;
  3664.     lpDeviceID: LPVARSTRING;
  3665.     lpszDeviceClass: LPCSTR): LONG;
  3666.     stdcall;
  3667.  
  3668. {$IFDEF Win32}
  3669. function phoneGetIDA(
  3670.     hPhone: HPHONE;
  3671.     lpDeviceID: LPVARSTRING;
  3672.     lpszDeviceClass: LPCSTR): LONG;
  3673.     stdcall;
  3674.  
  3675. function phoneGetIDW(
  3676.     hPhone: HPHONE;
  3677.     lpDeviceID: LPVARSTRING;
  3678.     lpszDeviceClass: LPCWSTR): LONG;
  3679.     stdcall;
  3680. {$ENDIF}
  3681.  
  3682. function phoneGetLamp(
  3683.     hPhone: HPHONE;
  3684.     dwButtonLampID: DWORD;
  3685.     lpdwLampMode: LPDWORD): LONG;
  3686.     stdcall;
  3687.  
  3688. {$IFDEF Tapi_Ver20_ORGREATER}
  3689. function phoneGetMessage(                                  {// TAPI v2.0}
  3690.     hPhoneApp: HPHONEAPP;
  3691.     lpMessage: LPPHONEMESSAGE;
  3692.     dwTimeout: DWORD): LONG;
  3693.     stdcall;
  3694. {$ENDIF}
  3695.  
  3696. function phoneGetRing(
  3697.     hPhone: HPHONE;
  3698.     lpdwRingMode: LPDWORD;
  3699.     lpdwVolume: LPDWORD): LONG;
  3700.     stdcall;
  3701.  
  3702. function phoneGetStatus(
  3703.     hPhone: HPHONE;
  3704.     lpPhoneStatus: LPPHONESTATUS): LONG;
  3705.     stdcall;
  3706.  
  3707. {$IFDEF Win32}
  3708. function phoneGetStatusA(
  3709.     hPhone: HPHONE;
  3710.     lpPhoneStatus: LPPHONESTATUS): LONG;
  3711.     stdcall;
  3712.  
  3713. function phoneGetStatusW(
  3714.     hPhone: HPHONE;
  3715.     lpPhoneStatus: LPPHONESTATUS): LONG;
  3716.     stdcall;
  3717. {$ENDIF}
  3718.  
  3719. function phoneGetStatusMessages(
  3720.     hPhone: HPHONE;
  3721.     lpdwPhoneStates: LPDWORD;
  3722.     lpdwButtonModes: LPDWORD;
  3723.     lpdwButtonStates: LPDWORD): LONG;
  3724.     stdcall;
  3725.  
  3726. function phoneGetVolume(
  3727.     hPhone: HPHONE;
  3728.     dwHookSwitchDev: DWORD;
  3729.     lpdwVolume: LPDWORD): LONG;
  3730.     stdcall;
  3731.  
  3732. function phoneInitialize(
  3733.     lphPhoneApp: LPHPHONEAPP;
  3734.     hInstance: HINST;
  3735.     lpfnCallback: TPHONECALLBACK;
  3736.     lpszAppName: LPCSTR;
  3737.     lpdwNumDevs: LPDWORD): LONG;
  3738.     stdcall;
  3739.  
  3740. {!! JEDI:bchoate:1997-11-11: Reorganized the following section to
  3741.  match the original header file (the whole $IFDEF span). }
  3742.  
  3743. {$IFDEF Tapi_Ver20_ORGREATER}
  3744. function phoneInitializeEx(                                {// TAPI v2.0}
  3745.     lphPhoneApp: LPHPHONEAPP;
  3746.     hInstance: HINST;
  3747.     lpfnCallback: TPHONECALLBACK;
  3748.     lpszFriendlyAppName: LPCSTR;
  3749.     lpdwNumDevs: LPDWORD;
  3750.     lpdwAPIVersion: LPDWORD;
  3751.     lpPhoneInitializeExParams: LPPHONEINITIALIZEEXPARAMS): LONG;
  3752.     stdcall;
  3753.  
  3754. {$IFDEF Win32}
  3755. function phoneInitializeExA(                               {// TAPI v2.0}
  3756.     lphPhoneApp: LPHPHONEAPP;
  3757.     hInstance: HINST;
  3758.     lpfnCallback: TPHONECALLBACK;
  3759.     lpszFriendlyAppName: LPCSTR;
  3760.     lpdwNumDevs: LPDWORD;
  3761.     lpdwAPIVersion: LPDWORD;
  3762.     lpPhoneInitializeExParams: LPPHONEINITIALIZEEXPARAMS): LONG;
  3763.     stdcall;
  3764.  
  3765. function phoneInitializeExW(                               {// TAPI v2.0}
  3766.     lphPhoneApp: LPHPHONEAPP;
  3767.     hInstance: HINST;
  3768.     lpfnCallback: TPHONECALLBACK;
  3769.     lpszFriendlyAppName: LPCWSTR;
  3770.     lpdwNumDevs: LPDWORD;
  3771.     lpdwAPIVersion: LPDWORD;
  3772.     lpPhoneInitializeExParams: LPPHONEINITIALIZEEXPARAMS): LONG;
  3773.     stdcall;
  3774. {$ENDIF}
  3775. {$ENDIF}
  3776.  
  3777. function phoneNegotiateAPIVersion(
  3778.     hPhoneApp: HPHONEAPP;
  3779.     dwDeviceID: DWORD;
  3780.     dwAPILowVersion: DWORD;
  3781.     dwAPIHighVersion: DWORD;
  3782.     lpdwAPIVersion: LPDWORD;
  3783.     lpExtensionID: LPPHONEEXTENSIONID): LONG;
  3784.     stdcall;
  3785.  
  3786. function phoneNegotiateExtVersion(
  3787.     hPhoneApp: HPHONEAPP;
  3788.     dwDeviceID: DWORD;
  3789.     dwAPIVersion: DWORD;
  3790.     dwExtLowVersion: DWORD;
  3791.     dwExtHighVersion: DWORD;
  3792.     lpdwExtVersion: LPDWORD): LONG;
  3793.     stdcall;
  3794.  
  3795. function phoneOpen(
  3796.     hPhoneApp: HPHONEAPP;
  3797.     dwDeviceID: DWORD;
  3798.     lphPhone: LPHPHONE;
  3799.     dwAPIVersion: DWORD;
  3800.     dwExtVersion: DWORD;
  3801.     dwCallbackInstance: DWORD;
  3802.     dwPrivilege: DWORD): LONG;
  3803.     stdcall;
  3804.  
  3805. function phoneSetButtonInfo(
  3806.     hPhone: HPHONE;
  3807.     dwButtonLampID: DWORD;
  3808.     const lpButtonInfo: LPPHONEBUTTONINFO): LONG;
  3809.     stdcall;
  3810.  
  3811. {$IFDEF Win32}
  3812. function phoneSetButtonInfoA(
  3813.     hPhone: HPHONE;
  3814.     dwButtonLampID: DWORD;
  3815.     const lpButtonInfo: LPPHONEBUTTONINFO): LONG;
  3816.     stdcall;
  3817.  
  3818. function phoneSetButtonInfoW(
  3819.     hPhone: HPHONE;
  3820.     dwButtonLampID: DWORD;
  3821.     const lpButtonInfo: LPPHONEBUTTONINFO): LONG;
  3822.     stdcall;
  3823. {$ENDIF}
  3824.  
  3825. function phoneSetData(
  3826.     hPhone: HPHONE;
  3827.     dwDataID: DWORD;
  3828.     const lpData: LPVOID;
  3829.     dwSize: DWORD): LONG;
  3830.     stdcall;
  3831.  
  3832. function phoneSetDisplay(
  3833.     hPhone: HPHONE;
  3834.     dwRow: DWORD;
  3835.     dwColumn: DWORD;
  3836.     lpsDisplay: LPCSTR;
  3837.     dwSize: DWORD): LONG;
  3838.     stdcall;
  3839.  
  3840. function phoneSetGain(
  3841.     hPhone: HPHONE;
  3842.     dwHookSwitchDev: DWORD;
  3843.     dwGain: DWORD): LONG;
  3844.     stdcall;
  3845.  
  3846. function phoneSetHookSwitch(
  3847.     hPhone: HPHONE;
  3848.     dwHookSwitchDevs: DWORD;
  3849.     dwHookSwitchMode: DWORD): LONG;
  3850.     stdcall;
  3851.  
  3852. function phoneSetLamp(
  3853.     hPhone: HPHONE;
  3854.     dwButtonLampID: DWORD;
  3855.     dwLampMode: DWORD): LONG;
  3856.     stdcall;
  3857.  
  3858. function phoneSetRing(
  3859.     hPhone: HPHONE;
  3860.     dwRingMode: DWORD;
  3861.     dwVolume: DWORD): LONG;
  3862.     stdcall;
  3863.  
  3864. function phoneSetStatusMessages(
  3865.     hPhone: HPHONE;
  3866.     dwPhoneStates: DWORD;
  3867.     dwButtonModes: DWORD;
  3868.     dwButtonStates: DWORD): LONG;
  3869.     stdcall;
  3870.  
  3871. function phoneSetVolume(
  3872.     hPhone: HPHONE;
  3873.     dwHookSwitchDev: DWORD;
  3874.     dwVolume: DWORD): LONG;
  3875.     stdcall;
  3876.  
  3877. function phoneShutdown(
  3878.     hPhoneApp: HPHONEAPP): LONG;
  3879.     stdcall;
  3880.  
  3881. function tapiGetLocationInfo(
  3882.     lpszCountryCode: LPSTR;
  3883.     lpszCityCode: LPSTR): LONG;
  3884.     stdcall;
  3885.  
  3886. {$IFDEF Win32}
  3887. function tapiGetLocationInfoA(
  3888.     lpszCountryCode: LPSTR;
  3889.     lpszCityCode: LPSTR): LONG;
  3890.     stdcall;
  3891.  
  3892. function tapiGetLocationInfoW(
  3893.     lpszCountryCodeW: LPWSTR;
  3894.     lpszCityCodeW: LPWSTR): LONG;
  3895.     stdcall;
  3896. {$ENDIF}
  3897.  
  3898. function tapiRequestDrop(
  3899.     hwnd: HWND;
  3900.     wRequestID: WPARAM): LONG;
  3901.     stdcall;
  3902.  
  3903. function tapiRequestMakeCall(
  3904.     lpszDestAddress: LPCSTR;
  3905.     lpszAppName: LPCSTR;
  3906.     lpszCalledParty: LPCSTR;
  3907.     lpszComment: LPCSTR): LONG;
  3908.     stdcall;
  3909.  
  3910. {$IFDEF Win32}
  3911. function tapiRequestMakeCallA(
  3912.     lpszDestAddress: LPCSTR;
  3913.     lpszAppName: LPCSTR;
  3914.     lpszCalledParty: LPCSTR;
  3915.     lpszComment: LPCSTR): LONG;
  3916.     stdcall;
  3917.  
  3918. function tapiRequestMakeCallW(
  3919.     lpszDestAddress: LPCWSTR;
  3920.     lpszAppName: LPCWSTR;
  3921.     lpszCalledParty: LPCWSTR;
  3922.     lpszComment: LPCWSTR): LONG;
  3923.     stdcall;
  3924. {$ENDIF}
  3925.  
  3926. function tapiRequestMediaCall(
  3927.     hwnd: HWND;
  3928.     wRequestID: WPARAM;
  3929.     lpszDeviceClass: LPCSTR;
  3930.     lpDeviceID: LPCSTR;
  3931.     dwSize: DWORD;
  3932.     dwSecure: DWORD;
  3933.     lpszDestAddress: LPCSTR;
  3934.     lpszAppName: LPCSTR;
  3935.     lpszCalledParty: LPCSTR;
  3936.     lpszComment: LPCSTR): LONG;
  3937.     stdcall;
  3938.  
  3939. {$IFDEF Win32}
  3940. function tapiRequestMediaCallA(
  3941.     hwnd: HWND;
  3942.     wRequestID: WPARAM;
  3943.     lpszDeviceClass: LPCSTR;
  3944.     lpDeviceID: LPCSTR;
  3945.     dwSize: DWORD;
  3946.     dwSecure: DWORD;
  3947.     lpszDestAddress: LPCSTR;
  3948.     lpszAppName: LPCSTR;
  3949.     lpszCalledParty: LPCSTR;
  3950.     lpszComment: LPCSTR): LONG;
  3951.     stdcall;
  3952.  
  3953. function tapiRequestMediaCallW(
  3954.     hwnd: HWND;
  3955.     wRequestID: WPARAM;
  3956.     lpszDeviceClass: LPCWSTR;
  3957.     lpDeviceID: LPCWSTR;
  3958.     dwSize: DWORD;
  3959.     dwSecure: DWORD;
  3960.     lpszDestAddress: LPCWSTR;
  3961.     lpszAppName: LPCWSTR;
  3962.     lpszCalledParty: LPCWSTR): LONG;
  3963.     stdcall;
  3964. {$ENDIF}
  3965.  
  3966. (*
  3967.  
  3968. TAPIERROR_FORMATMESSAGE - macro to convert a TAPI error constant
  3969.     into a constant that FormatMessage will accept
  3970.  
  3971.         TAPIERR: Negative numbers and 0
  3972.             Map to: strip off high WORD
  3973.             Example: 0xFFFFFFFF (-1) becomes 0x0000FFFF
  3974.         LINEERR: Start at 0x80000000
  3975.             Map to: strip off 0x80000000 and add 0xE000
  3976.             Example: 0x80000004 becomes 0x0000E004
  3977.         PHONEERR: Start at 0x90000000
  3978.             Map to: strip off 0x90000000 and add 0xF000
  3979.             Example: 0x9000000A becomes 0x0000F00A
  3980.  
  3981.         pseudocode:
  3982.  
  3983.         if (__ErrCode__ is a TAPIERR)
  3984.             strip off high word
  3985.  
  3986.             else if (__ErrCode__ is a PHONEERR)
  3987.                 strip off 0x90000000
  3988.                 add 0xE000
  3989.  
  3990.                 else
  3991.                     strip off 0x80000000
  3992.                     add 0xF000
  3993.  
  3994. *)
  3995.  
  3996. function TAPIERROR_FORMATMESSAGE(ErrCode: INT): INT;
  3997.  
  3998. {!! Convenience functions added for Delphi: }
  3999.  
  4000. function TapiError(ResultCode: longint): Boolean;
  4001.   {-Returns True if ResultCode indicates an error; True if success }
  4002.  
  4003. procedure TapiCheck(ResultCode: longint);
  4004.   {-Raises an exception if ResultCode indicates an error }
  4005.  
  4006. {!!}
  4007.  
  4008. implementation
  4009.  
  4010. uses
  4011.   SysUtils;
  4012.  
  4013. const
  4014. {$IFDEF Win32}
  4015.   TapiDll = 'tapi32.dll';
  4016. {$ELSE}
  4017.   TapiDll = 'tapi.dll';
  4018. {$ENDIF}
  4019.  
  4020. function lineAccept; external TapiDll name 'lineAccept';
  4021.  
  4022. {$IFDEF UNICODE}
  4023. function lineAddProvider; external TapiDll name 'lineAddProviderW';
  4024. {$ELSE}
  4025. {$IFDEF Tapi_Ver20_ORGREATER}
  4026. function lineAddProvider; external TapiDll name 'lineAddProviderA';
  4027. {$ELSE}
  4028. function lineAddProvider; external TapiDll name 'lineAddProvider';
  4029. {$ENDIF}
  4030. {$ENDIF}
  4031.  
  4032. function lineAddToConference; external TapiDll name 'lineAddToConference';
  4033. {$IFDEF Tapi_Ver20_ORGREATER}
  4034. function lineAgentSpecific; external TapiDll name 'lineAgentSpecific';
  4035. {$ENDIF}
  4036. function lineAnswer; external TapiDll name 'lineAnswer';
  4037.  
  4038. {$IFDEF UNICODE}
  4039. function lineBlindTransfer; external TapiDll name 'lineBlindTransferW';
  4040. {$ELSE}
  4041. {$IFDEF Tapi_Ver20_ORGREATER}
  4042. function lineBlindTransfer; external TapiDll name 'lineBlindTransferA';
  4043. {$ELSE}
  4044. function lineBlindTransfer; external TapiDll name 'lineBlindTransfer';
  4045. {$ENDIF}
  4046. {$ENDIF}
  4047.  
  4048. function lineClose; external TapiDll name 'lineClose';
  4049. function lineCompleteCall; external TapiDll name 'lineCompleteCall';
  4050. function lineCompleteTransfer; external TapiDll name 'lineCompleteTransfer';
  4051.  
  4052. {$IFDEF UNICODE}
  4053. function lineConfigDialog; external TapiDll name 'lineConfigDialogW';
  4054. {$ELSE}
  4055. {$IFDEF Tapi_Ver20_ORGREATER}
  4056. function lineConfigDialog; external TapiDll name 'lineConfigDialogA';
  4057. {$ELSE}
  4058. function lineConfigDialog; external TapiDll name 'lineConfigDialog';
  4059. {$ENDIF}
  4060. {$ENDIF}
  4061.  
  4062. {$IFDEF UNICODE}
  4063. function lineConfigDialogEdit; external TapiDll name 'lineConfigDialogEditW';
  4064. {$ELSE}
  4065. {$IFDEF Tapi_Ver20_ORGREATER}
  4066. function lineConfigDialogEdit; external TapiDll name 'lineConfigDialogEditA';
  4067. {$ELSE}
  4068. function lineConfigDialogEdit; external TapiDll name 'lineConfigDialogEdit';
  4069. {$ENDIF}
  4070. {$ENDIF}
  4071.  
  4072. function lineConfigProvider; external TapiDll name 'lineConfigProvider';
  4073. function lineDeallocateCall; external TapiDll name 'lineDeallocateCall';
  4074. function lineDevSpecific; external TapiDll name 'lineDevSpecific';
  4075. function lineDevSpecificFeature; external TapiDll name 'lineDevSpecificFeature';
  4076.  
  4077. {$IFDEF UNICODE}
  4078. function lineDial; external TapiDll name 'lineDialW';
  4079. {$ELSE}
  4080. {$IFDEF Tapi_Ver20_ORGREATER}
  4081. function lineDial; external TapiDll name 'lineDialA';
  4082. {$ELSE}
  4083. function lineDial; external TapiDll name 'lineDial';
  4084. {$ENDIF}
  4085. {$ENDIF}
  4086.   
  4087. function lineDrop; external TapiDll name 'lineDrop';
  4088.   
  4089. {$IFDEF UNICODE}
  4090. function lineForward; external TapiDll name 'lineForwardW';
  4091. {$ELSE}
  4092. {$IFDEF Tapi_Ver20_ORGREATER}
  4093. function lineForward; external TapiDll name 'lineForwardA';
  4094. {$ELSE}
  4095. function lineForward; external TapiDll name 'lineForward';
  4096. {$ENDIF}
  4097. {$ENDIF}
  4098.   
  4099. {$IFDEF UNICODE}
  4100. function lineGatherDigits; external TapiDll name 'lineGatherDigitsW';
  4101. {$ELSE}
  4102. {$IFDEF Tapi_Ver20_ORGREATER}
  4103. function lineGatherDigits; external TapiDll name 'lineGatherDigitsA';
  4104. {$ELSE}
  4105. function lineGatherDigits; external TapiDll name 'lineGatherDigits';
  4106. {$ENDIF}
  4107. {$ENDIF}
  4108.   
  4109. {$IFDEF UNICODE}
  4110. function lineGenerateDigits; external TapiDll name 'lineGenerateDigitsW';
  4111. {$ELSE}
  4112. {$IFDEF Tapi_Ver20_ORGREATER}
  4113. function lineGenerateDigits; external TapiDll name 'lineGenerateDigitsA';
  4114. {$ELSE}
  4115. function lineGenerateDigits; external TapiDll name 'lineGenerateDigits';
  4116. {$ENDIF}
  4117. {$ENDIF}
  4118.   
  4119. function lineGenerateTone; external TapiDll name 'lineGenerateTone';
  4120.   
  4121. {$IFDEF UNICODE}
  4122. function lineGetAddressCaps; external TapiDll name 'lineGetAddressCapsW';
  4123. {$ELSE}
  4124. {$IFDEF Tapi_Ver20_ORGREATER}
  4125. function lineGetAddressCaps; external TapiDll name 'lineGetAddressCapsA';
  4126. {$ELSE}
  4127. function lineGetAddressCaps; external TapiDll name 'lineGetAddressCaps';
  4128. {$ENDIF}
  4129. {$ENDIF}
  4130.   
  4131. {$IFDEF UNICODE}
  4132. function lineGetAddressID; external TapiDll name 'lineGetAddressIDW';
  4133. {$ELSE}
  4134. {$IFDEF Tapi_Ver20_ORGREATER}
  4135. function lineGetAddressID; external TapiDll name 'lineGetAddressIDA';
  4136. {$ELSE}
  4137. function lineGetAddressID; external TapiDll name 'lineGetAddressID';
  4138. {$ENDIF}
  4139. {$ENDIF}
  4140.   
  4141. {$IFDEF UNICODE}
  4142. function lineGetAddressStatus; external TapiDll name 'lineGetAddressStatusW';
  4143. {$ELSE}
  4144. {$IFDEF Tapi_Ver20_ORGREATER}
  4145. function lineGetAddressStatus; external TapiDll name 'lineGetAddressStatusA';
  4146. {$ELSE}
  4147. function lineGetAddressStatus; external TapiDll name 'lineGetAddressStatus';
  4148. {$ENDIF}
  4149. {$ENDIF}
  4150.   
  4151. {$IFDEF Tapi_Ver20_ORGREATER}
  4152. {$IFDEF UNICODE}
  4153. function lineGetAgentStatus; external TapiDll name 'lineGetAgentStatusW';
  4154. {$ELSE}
  4155. function lineGetAgentStatus; external TapiDll name 'lineGetAgentStatusA';
  4156. {$ENDIF}
  4157.  
  4158. {$IFDEF UNICODE}
  4159. function lineGetAgentGroupList; external TapiDll name 'lineGetAgentGroupListW';
  4160. {$ELSE}
  4161. function lineGetAgentGroupList; external TapiDll name 'lineGetAgentGroupListA';
  4162. {$ENDIF}
  4163.  
  4164. {$IFDEF UNICODE}
  4165. function lineGetAgentCaps; external TapiDll name 'lineGetAgentCapsW';
  4166. {$ELSE}
  4167. function lineGetAgentCaps; external TapiDll name 'lineGetAgentCapsA';
  4168. {$ENDIF}
  4169.   
  4170. {$IFDEF UNICODE}
  4171. function lineGetAgentActivityList; external TapiDll name 'lineGetAgentActivityListW';
  4172. {$ELSE}
  4173. function lineGetAgentActivityList; external TapiDll name 'lineGetAgentActivityListA';
  4174. {$ENDIF}
  4175. {$ENDIF}
  4176.  
  4177. {$IFDEF UNICODE}
  4178. function lineGetAppPriority; external TapiDll name 'lineGetAppPriorityW';
  4179. {$ELSE}
  4180. {$IFDEF Tapi_Ver20_ORGREATER}
  4181. function lineGetAppPriority; external TapiDll name 'lineGetAppPriorityA';
  4182. {$ELSE}
  4183. function lineGetAppPriority; external TapiDll name 'lineGetAppPriority';
  4184. {$ENDIF}
  4185. {$ENDIF}
  4186.   
  4187. {$IFDEF UNICODE}
  4188. function lineGetCallInfo; external TapiDll name 'lineGetCallInfoW';
  4189. {$ELSE}
  4190. {$IFDEF Tapi_Ver20_ORGREATER}
  4191. function lineGetCallInfo; external TapiDll name 'lineGetCallInfoA';
  4192. {$ELSE}
  4193. function lineGetCallInfo; external TapiDll name 'lineGetCallInfo';
  4194. {$ENDIF}
  4195. {$ENDIF}
  4196.   
  4197. function lineGetCallStatus; external TapiDll name 'lineGetCallStatus';
  4198. function lineGetConfRelatedCalls; external TapiDll name 'lineGetConfRelatedCalls';
  4199.  
  4200. {$IFDEF UNICODE}
  4201. function lineGetCountry; external TapiDll name 'lineGetCountryW';
  4202. {$ELSE}
  4203. {$IFDEF Tapi_Ver20_ORGREATER}
  4204. function lineGetCountry; external TapiDll name 'lineGetCountryA';
  4205. {$ELSE}
  4206. function lineGetCountry; external TapiDll name 'lineGetCountry';
  4207. {$ENDIF}
  4208. {$ENDIF}
  4209.   
  4210. {$IFDEF UNICODE}
  4211. function lineGetDevCaps; external TapiDll name 'lineGetDevCapsW';
  4212. {$ELSE}
  4213. {$IFDEF Tapi_Ver20_ORGREATER}
  4214. function lineGetDevCaps; external TapiDll name 'lineGetDevCapsA';
  4215. {$ELSE}
  4216. function lineGetDevCaps; external TapiDll name 'lineGetDevCaps';
  4217. {$ENDIF}
  4218. {$ENDIF}
  4219.   
  4220. {$IFDEF UNICODE}
  4221. function lineGetDevConfig; external TapiDll name 'lineGetDevConfigW';
  4222. {$ELSE}
  4223. {$IFDEF Tapi_Ver20_ORGREATER}
  4224. function lineGetDevConfig; external TapiDll name 'lineGetDevConfigA';
  4225. {$ELSE}
  4226. function lineGetDevConfig; external TapiDll name 'lineGetDevConfig';
  4227. {$ENDIF}
  4228. {$ENDIF}
  4229.   
  4230. function lineGetNewCalls; external TapiDll name 'lineGetNewCalls';
  4231.   
  4232. {$IFDEF UNICODE}
  4233. function lineGetIcon; external TapiDll name 'lineGetIconW';
  4234. {$ELSE}
  4235. {$IFDEF Tapi_Ver20_ORGREATER}
  4236. function lineGetIcon; external TapiDll name 'lineGetIconA';
  4237. {$ELSE}
  4238. function lineGetIcon; external TapiDll name 'lineGetIcon';
  4239. {$ENDIF}
  4240. {$ENDIF}
  4241.   
  4242. {$IFDEF UNICODE}
  4243. function lineGetID; external TapiDll name 'lineGetIDW';
  4244. {$ELSE}
  4245. {$IFDEF Tapi_Ver20_ORGREATER}
  4246. function lineGetID; external TapiDll name 'lineGetIDA';
  4247. {$ELSE}
  4248. function lineGetID; external TapiDll name 'lineGetID';
  4249. {$ENDIF}
  4250. {$ENDIF}
  4251.   
  4252. {$IFDEF UNICODE}
  4253. function lineGetLineDevStatus; external TapiDll name 'lineGetLineDevStatusW';
  4254. {$ELSE}
  4255. {$IFDEF Tapi_Ver20_ORGREATER}
  4256. function lineGetLineDevStatus; external TapiDll name 'lineGetLineDevStatusA';
  4257. {$ELSE}
  4258. function lineGetLineDevStatus; external TapiDll name 'lineGetLineDevStatus';
  4259. {$ENDIF}
  4260. {$ENDIF}
  4261.   
  4262. {$IFDEF Tapi_Ver20_ORGREATER}
  4263. function lineGetMessage; external TapiDll name 'lineGetMessage';
  4264. {$ENDIF}
  4265. function lineGetNumRings; external TapiDll name 'lineGetNumRings';
  4266.   
  4267. {$IFDEF UNICODE}
  4268. function lineGetProviderList; external TapiDll name 'lineGetProviderListW';
  4269. {$ELSE}
  4270. {$IFDEF Tapi_Ver20_ORGREATER}
  4271. function lineGetProviderList; external TapiDll name 'lineGetProviderListA';
  4272. {$ELSE}
  4273. function lineGetProviderList; external TapiDll name 'lineGetProviderList';
  4274. {$ENDIF}
  4275. {$ENDIF}
  4276.   
  4277. {$IFDEF UNICODE}
  4278. function lineGetRequest; external TapiDll name 'lineGetRequestW';
  4279. {$ELSE}
  4280. {$IFDEF Tapi_Ver20_ORGREATER}
  4281. function lineGetRequest; external TapiDll name 'lineGetRequestA';
  4282. {$ELSE}
  4283. function lineGetRequest; external TapiDll name 'lineGetRequest';
  4284. {$ENDIF}
  4285. {$ENDIF}
  4286.   
  4287. function lineGetStatusMessages; external TapiDll name 'lineGetStatusMessages';
  4288.   
  4289. {$IFDEF UNICODE}
  4290. function lineGetTranslateCaps; external TapiDll name 'lineGetTranslateCapsW';
  4291. {$ELSE}
  4292. {$IFDEF Tapi_Ver20_ORGREATER}
  4293. function lineGetTranslateCaps; external TapiDll name 'lineGetTranslateCapsA';
  4294. {$ELSE}
  4295. function lineGetTranslateCaps; external TapiDll name 'lineGetTranslateCaps';
  4296. {$ENDIF}
  4297. {$ENDIF}
  4298.   
  4299. {$IFDEF UNICODE}
  4300. function lineHandoff; external TapiDll name 'lineHandoffW';
  4301. {$ELSE}
  4302. {$IFDEF Tapi_Ver20_ORGREATER}
  4303. function lineHandoff; external TapiDll name 'lineHandoffA';
  4304. {$ELSE}
  4305. function lineHandoff; external TapiDll name 'lineHandoff';
  4306. {$ENDIF}
  4307. {$ENDIF}
  4308.   
  4309. function lineHold; external TapiDll name 'lineHold';
  4310. function lineInitialize; external TapiDll name 'lineInitialize';
  4311.   
  4312. {$IFDEF Tapi_Ver20_ORGREATER}
  4313. {$IFDEF UNICODE}
  4314. function lineInitializeEx; external TapiDll name 'lineInitializeExW';
  4315. {$ELSE}
  4316. function lineInitializeEx; external TapiDll name 'lineInitializeExA';
  4317. {$ENDIF}
  4318. {$ENDIF}
  4319.  
  4320. {$IFDEF UNICODE}
  4321. function lineMakeCall; external TapiDll name 'lineMakeCallW';
  4322. {$ELSE}
  4323. {$IFDEF Tapi_Ver20_ORGREATER}
  4324. function lineMakeCall; external TapiDll name 'lineMakeCallA';
  4325. {$ELSE}
  4326. function lineMakeCall; external TapiDll name 'lineMakeCall';
  4327. {$ENDIF}
  4328. {$ENDIF}
  4329.   
  4330. function lineMonitorDigits; external TapiDll name 'lineMonitorDigits';
  4331. function lineMonitorMedia; external TapiDll name 'lineMonitorMedia';
  4332. function lineMonitorTones; external TapiDll name 'lineMonitorTones';
  4333. function lineNegotiateAPIVersion; external TapiDll name 'lineNegotiateAPIVersion';
  4334. function lineNegotiateExtVersion; external TapiDll name 'lineNegotiateExtVersion';
  4335.   
  4336. {$IFDEF UNICODE}
  4337. function lineOpen; external TapiDll name 'lineOpenW';
  4338. {$ELSE}
  4339. {$IFDEF Tapi_Ver20_ORGREATER}
  4340. function lineOpen; external TapiDll name 'lineOpenA';
  4341. {$ELSE}
  4342. function lineOpen; external TapiDll name 'lineOpen';
  4343. {$ENDIF}
  4344. {$ENDIF}
  4345.   
  4346. {$IFDEF UNICODE}
  4347. function linePark; external TapiDll name 'lineParkW';
  4348. {$ELSE}
  4349. {$IFDEF Tapi_Ver20_ORGREATER}
  4350. function linePark; external TapiDll name 'lineParkA';
  4351. {$ELSE}
  4352. function linePark; external TapiDll name 'linePark';
  4353. {$ENDIF}
  4354. {$ENDIF}
  4355.   
  4356. {$IFDEF UNICODE}
  4357. function linePickup; external TapiDll name 'linePickupW';
  4358. {$ELSE}
  4359. {$IFDEF Tapi_Ver20_ORGREATER}
  4360. function linePickup; external TapiDll name 'linePickupA';
  4361. {$ELSE}
  4362. function linePickup; external TapiDll name 'linePickup';
  4363. {$ENDIF}
  4364. {$ENDIF}
  4365.   
  4366. {$IFDEF UNICODE}
  4367. function linePrepareAddToConference; external TapiDll name 'linePrepareAddToConferenceW';
  4368. {$ELSE}
  4369. {$IFDEF Tapi_Ver20_ORGREATER}
  4370. function linePrepareAddToConference; external TapiDll name 'linePrepareAddToConferenceA';
  4371. {$ELSE}
  4372. function linePrepareAddToConference; external TapiDll name 'linePrepareAddToConference';
  4373. {$ENDIF}
  4374. {$ENDIF}
  4375.  
  4376. {$IFDEF Tapi_Ver20_ORGREATER}
  4377. function lineProxyMessage; external TapiDll name 'lineProxyMessage';
  4378. function lineProxyResponse; external TapiDll name 'lineProxyResponse';
  4379. {$ENDIF}
  4380.  
  4381. {$IFDEF UNICODE}
  4382. function lineRedirect; external TapiDll name 'lineRedirectW';
  4383. {$ELSE}
  4384. {$IFDEF Tapi_Ver20_ORGREATER}
  4385. function lineRedirect; external TapiDll name 'lineRedirectA';
  4386. {$ELSE}
  4387. function lineRedirect; external TapiDll name 'lineRedirect';
  4388. {$ENDIF}
  4389. {$ENDIF}
  4390.   
  4391. function lineRegisterRequestRecipient; external TapiDll name 'lineRegisterRequestRecipient';
  4392. function lineReleaseUserUserInfo; external TapiDll name 'lineReleaseUserUserInfo';
  4393. function lineRemoveFromConference; external TapiDll name 'lineRemoveFromConference';
  4394. function lineRemoveProvider; external TapiDll name 'lineRemoveProvider';
  4395. function lineSecureCall; external TapiDll name 'lineSecureCall';
  4396. function lineSendUserUserInfo; external TapiDll name 'lineSendUserUserInfo';
  4397. {$IFDEF Tapi_Ver20_ORGREATER}
  4398. function lineSetAgentActivity; external TapiDll name 'lineSetAgentActivity';
  4399. function lineSetAgentGroup; external TapiDll name 'lineSetAgentGroup';
  4400. function lineSetAgentState; external TapiDll name 'lineSetAgentState';
  4401. {$ENDIF}
  4402.  
  4403. {$IFDEF UNICODE}
  4404. function lineSetAppPriority; external TapiDll name 'lineSetAppPriorityW';
  4405. {$ELSE}
  4406. {$IFDEF Tapi_Ver20_ORGREATER}
  4407. function lineSetAppPriority; external TapiDll name 'lineSetAppPriorityA';
  4408. {$ELSE}
  4409. function lineSetAppPriority; external TapiDll name 'lineSetAppPriority';
  4410. {$ENDIF}
  4411. {$ENDIF}
  4412.   
  4413. function lineSetAppSpecific; external TapiDll name 'lineSetAppSpecific';
  4414. {$IFDEF Tapi_Ver20_ORGREATER}
  4415. function lineSetCallData; external TapiDll name 'lineSetCallData';
  4416. {$ENDIF}
  4417. function lineSetCallParams; external TapiDll name 'lineSetCallParams';
  4418. function lineSetCallPrivilege; external TapiDll name 'lineSetCallPrivilege';
  4419. {$IFDEF Tapi_Ver20_ORGREATER}
  4420. function lineSetCallQualityOfService; external TapiDll name 'lineSetCallQualityOfService';
  4421. function lineSetCallTreatment; external TapiDll name 'lineSetCallTreatment';
  4422. {$ENDIF}
  4423. function lineSetCurrentLocation; external TapiDll name 'lineSetCurrentLocation';
  4424. function lineSetDevConfig; external TapiDll name 'lineSetDevConfig';
  4425. {$IFDEF Tapi_Ver20_ORGREATER}
  4426. function lineSetLineDevStatus; external TapiDll name 'lineSetLineDevStatus';
  4427. {$ENDIF}
  4428. function lineSetMediaControl; external TapiDll name 'lineSetMediaControl';
  4429. function lineSetMediaMode; external TapiDll name 'lineSetMediaMode';
  4430. function lineSetNumRings; external TapiDll name 'lineSetNumRings';
  4431. function lineSetStatusMessages; external TapiDll name 'lineSetStatusMessages';
  4432. function lineSetTerminal; external TapiDll name 'lineSetTerminal';
  4433. function lineSetTollList; external TapiDll name 'lineSetTollList';
  4434. function lineSetupConference; external TapiDll name 'lineSetupConference';
  4435. function lineSetupTransfer; external TapiDll name 'lineSetupTransfer';
  4436. function lineShutdown; external TapiDll name 'lineShutdown';
  4437. function lineSwapHold; external TapiDll name 'lineSwapHold';
  4438. function lineTranslateAddress; external TapiDll name 'lineTranslateAddress';
  4439. function lineTranslateDialog; external TapiDll name 'lineTranslateDialog';
  4440. function lineUncompleteCall; external TapiDll name 'lineUncompleteCall';
  4441. function lineUnhold; external TapiDll name 'lineUnhold';
  4442. function lineUnpark; external TapiDll name 'lineUnpark';
  4443. function phoneClose; external TapiDll name 'phoneClose';
  4444. function phoneConfigDialog; external TapiDll name 'phoneConfigDialog';
  4445. function phoneDevSpecific; external TapiDll name 'phoneDevSpecific';
  4446. function phoneGetButtonInfo; external TapiDll name 'phoneGetButtonInfo';
  4447. function phoneGetData; external TapiDll name 'phoneGetData';
  4448. function phoneGetDevCaps; external TapiDll name 'phoneGetDevCaps';
  4449. function phoneGetDisplay; external TapiDll name 'phoneGetDisplay';
  4450. function phoneGetGain; external TapiDll name 'phoneGetGain';
  4451. function phoneGetHookSwitch; external TapiDll name 'phoneGetHookSwitch';
  4452. function phoneGetIcon; external TapiDll name 'phoneGetIcon';
  4453. function phoneGetID; external TapiDll name 'phoneGetID';
  4454. function phoneGetLamp; external TapiDll name 'phoneGetLamp';
  4455. {$IFDEF Tapi_Ver20_ORGREATER}
  4456. function phoneGetMessage; external TapiDll name 'phoneGetMessage';
  4457. {$ENDIF}
  4458. function phoneGetRing; external TapiDll name 'phoneGetRing';
  4459. function phoneGetStatus; external TapiDll name 'phoneGetStatus';
  4460. function phoneGetStatusMessages; external TapiDll name 'phoneGetStatusMessages';
  4461. function phoneGetVolume; external TapiDll name 'phoneGetVolume';
  4462. function phoneInitialize; external TapiDll name 'phoneInitialize';
  4463. {$IFDEF Tapi_Ver20_ORGREATER}
  4464. function phoneInitializeEx; external TapiDll name 'phoneInitializeEx';
  4465. {$ENDIF}
  4466. function phoneNegotiateAPIVersion; external TapiDll name 'phoneNegotiateAPIVersion';
  4467. function phoneNegotiateExtVersion; external TapiDll name 'phoneNegotiateExtVersion';
  4468. function phoneOpen; external TapiDll name 'phoneOpen';
  4469. function phoneSetButtonInfo; external TapiDll name 'phoneSetButtonInfo';
  4470. function phoneSetData; external TapiDll name 'phoneSetData';
  4471. function phoneSetDisplay; external TapiDll name 'phoneSetDisplay';
  4472. function phoneSetGain; external TapiDll name 'phoneSetGain';
  4473. function phoneSetHookSwitch; external TapiDll name 'phoneSetHookSwitch';
  4474. function phoneSetLamp; external TapiDll name 'phoneSetLamp';
  4475. function phoneSetRing; external TapiDll name 'phoneSetRing';
  4476. function phoneSetStatusMessages; external TapiDll name 'phoneSetStatusMessages';
  4477. function phoneSetVolume; external TapiDll name 'phoneSetVolume';
  4478. function phoneShutdown; external TapiDll name 'phoneShutdown';
  4479. function tapiGetLocationInfo; external TapiDll name 'tapiGetLocationInfo';
  4480. function tapiRequestDrop; external TapiDll name 'tapiRequestDrop';
  4481. function tapiRequestMakeCall; external TapiDll name 'tapiRequestMakeCall';
  4482. function tapiRequestMediaCall; external TapiDll name 'tapiRequestMediaCall';
  4483.  
  4484. {$IFDEF Win32}
  4485. function lineAddProviderA; external TapiDll name 'lineAddProvider';
  4486. function lineAddProviderW; external TapiDll name 'lineAddProviderW';
  4487. function lineBlindTransferA; external TapiDll name 'lineBlindTransfer';
  4488. function lineBlindTransferW; external TapiDll name 'lineBlindTransferW';
  4489. function lineConfigDialogA; external TapiDll name 'lineConfigDialog';
  4490. function lineConfigDialogW; external TapiDll name 'lineConfigDialogW';
  4491. function lineConfigDialogEditA; external TapiDll name 'lineConfigDialogEdit';
  4492. function lineConfigDialogEditW; external TapiDll name 'lineConfigDialogEditW';
  4493. function lineDialA; external TapiDll name 'lineDial';
  4494. function lineDialW; external TapiDll name 'lineDialW';
  4495. function lineForwardA; external TapiDll name 'lineForward';
  4496. function lineForwardW; external TapiDll name 'lineForwardW';
  4497. function lineGatherDigitsA; external TapiDll name 'lineGatherDigits';
  4498. function lineGatherDigitsW; external TapiDll name 'lineGatherDigitsW';
  4499. function lineGenerateDigitsA; external TapiDll name 'lineGenerateDigits';
  4500. function lineGenerateDigitsW; external TapiDll name 'lineGenerateDigitsW';
  4501. function lineGetAddressCapsA; external TapiDll name 'lineGetAddressCaps';
  4502. function lineGetAddressCapsW; external TapiDll name 'lineGetAddressCapsW';
  4503. function lineGetAddressIDA; external TapiDll name 'lineGetAddressID';
  4504. function lineGetAddressIDW; external TapiDll name 'lineGetAddressIDW';
  4505. function lineGetAddressStatusA; external TapiDll name 'lineGetAddressStatus';
  4506. function lineGetAddressStatusW; external TapiDll name 'lineGetAddressStatusW';
  4507. {$IFDEF Tapi_Ver20_ORGREATER}
  4508. function lineGetAgentActivityListA; external TapiDll name 'lineGetAgentActivityList';
  4509. function lineGetAgentActivityListW; external TapiDll name 'lineGetAgentActivityListW';
  4510. function lineGetAgentCapsA; external TapiDll name 'lineGetAgentCaps';
  4511. function lineGetAgentCapsW; external TapiDll name 'lineGetAgentCapsW';
  4512. function lineGetAgentGroupListA; external TapiDll name 'lineGetAgentGroupList';
  4513. function lineGetAgentGroupListW; external TapiDll name 'lineGetAgentGroupListW';
  4514. function lineGetAgentStatusA; external TapiDll name 'lineGetAgentStatus';
  4515. function lineGetAgentStatusW; external TapiDll name 'lineGetAgentStatusW';
  4516. {$ENDIF}
  4517. function lineGetAppPriorityA; external TapiDll name 'lineGetAppPriority';
  4518. function lineGetAppPriorityW; external TapiDll name 'lineGetAppPriorityW';
  4519. function lineGetCallInfoA; external TapiDll name 'lineGetCallInfo';
  4520. function lineGetCallInfoW; external TapiDll name 'lineGetCallInfoW';
  4521. function lineGetCountryA; external TapiDll name 'lineGetCountry';
  4522. function lineGetCountryW; external TapiDll name 'lineGetCountryW';
  4523. function lineGetDevCapsA; external TapiDll name 'lineGetDevCaps';
  4524. function lineGetDevCapsW; external TapiDll name 'lineGetDevCapsW';
  4525. function lineGetDevConfigA; external TapiDll name 'lineGetDevConfig';
  4526. function lineGetDevConfigW; external TapiDll name 'lineGetDevConfigW';
  4527. function lineGetIconA; external TapiDll name 'lineGetIcon';
  4528. function lineGetIconW; external TapiDll name 'lineGetIconW';
  4529. function lineGetIDA; external TapiDll name 'lineGetID';
  4530. function lineGetIDW; external TapiDll name 'lineGetIDW';
  4531. function lineGetLineDevStatusA; external TapiDll name 'lineGetLineDevStatus';
  4532. function lineGetLineDevStatusW; external TapiDll name 'lineGetLineDevStatusW';
  4533. function lineGetProviderListA; external TapiDll name 'lineGetProviderList';
  4534. function lineGetProviderListW; external TapiDll name 'lineGetProviderListW';
  4535. function lineGetRequestA; external TapiDll name 'lineGetRequest';
  4536. function lineGetRequestW; external TapiDll name 'lineGetRequestW';
  4537. function lineGetTranslateCapsA; external TapiDll name 'lineGetTranslateCaps';
  4538. function lineGetTranslateCapsW; external TapiDll name 'lineGetTranslateCapsW';
  4539. function lineHandoffA; external TapiDll name 'lineHandoff';
  4540. function lineHandoffW; external TapiDll name 'lineHandoffW';
  4541. {$IFDEF Tapi_Ver20_ORGREATER}
  4542. function lineInitializeExA; external TapiDll name 'lineInitializeEx';
  4543. function lineInitializeExW; external TapiDll name 'lineInitializeExW';
  4544. {$ENDIF}
  4545. function lineMakeCallA; external TapiDll name 'lineMakeCall';
  4546. function lineMakeCallW; external TapiDll name 'lineMakeCallW';
  4547. function lineOpenA; external TapiDll name 'lineOpen';
  4548. function lineOpenW; external TapiDll name 'lineOpenW';
  4549. function lineParkA; external TapiDll name 'linePark';
  4550. function lineParkW; external TapiDll name 'lineParkW';
  4551. function linePickupA; external TapiDll name 'linePickup';
  4552. function linePickupW; external TapiDll name 'linePickupW';
  4553. function linePrepareAddToConferenceA; external TapiDll name 'linePrepareAddToConference';
  4554. function linePrepareAddToConferenceW; external TapiDll name 'linePrepareAddToConferenceW';
  4555. function lineRedirectA; external TapiDll name 'lineRedirect';
  4556. function lineRedirectW; external TapiDll name 'lineRedirectW';
  4557. function lineSetAppPriorityA; external TapiDll name 'lineSetAppPriority';
  4558. function lineSetAppPriorityW; external TapiDll name 'lineSetAppPriorityW';
  4559. function lineSetDevConfigA; external TapiDll name 'lineSetDevConfig';
  4560. function lineSetDevConfigW; external TapiDll name 'lineSetDevConfigW';
  4561. function lineSetTollListA; external TapiDll name 'lineSetTollList';
  4562. function lineSetTollListW; external TapiDll name 'lineSetTollListW';
  4563. function lineSetupConferenceA; external TapiDll name 'lineSetupConference';
  4564. function lineSetupConferenceW; external TapiDll name 'lineSetupConferenceW';
  4565. function lineSetupTransferA; external TapiDll name 'lineSetupTransfer';
  4566. function lineSetupTransferW; external TapiDll name 'lineSetupTransferW';
  4567. function lineTranslateAddressA; external TapiDll name 'lineTranslateAddress';
  4568. function lineTranslateAddressW; external TapiDll name 'lineTranslateAddressW';
  4569. function lineTranslateDialogA; external TapiDll name 'lineTranslateDialog';
  4570. function lineTranslateDialogW; external TapiDll name 'lineTranslateDialogW';
  4571. function lineUnparkA; external TapiDll name 'lineUnpark';
  4572. function lineUnparkW; external TapiDll name 'lineUnparkW';
  4573. function phoneConfigDialogA; external TapiDll name 'phoneConfigDialog';
  4574. function phoneConfigDialogW; external TapiDll name 'phoneConfigDialogW';
  4575. function phoneGetButtonInfoA; external TapiDll name 'phoneGetButtonInfo';
  4576. function phoneGetButtonInfoW; external TapiDll name 'phoneGetButtonInfoW';
  4577. function phoneGetDevCapsA; external TapiDll name 'phoneGetDevCaps';
  4578. function phoneGetDevCapsW; external TapiDll name 'phoneGetDevCapsW';
  4579. function phoneGetIconA; external TapiDll name 'phoneGetIcon';
  4580. function phoneGetIconW; external TapiDll name 'phoneGetIconW';
  4581. function phoneGetIDA; external TapiDll name 'phoneGetID';
  4582. function phoneGetIDW; external TapiDll name 'phoneGetIDW';
  4583. function phoneGetStatusA; external TapiDll name 'phoneGetStatus';
  4584. function phoneGetStatusW; external TapiDll name 'phoneGetStatusW';
  4585. {$IFDEF Tapi_Ver20_ORGREATER}
  4586. function phoneInitializeExA; external TapiDll name 'phoneInitializeEx';
  4587. function phoneInitializeExW; external TapiDll name 'phoneInitializeExW';
  4588. {$ENDIF}
  4589. function phoneSetButtonInfoA; external TapiDll name 'phoneSetButtonInfo';
  4590. function phoneSetButtonInfoW; external TapiDll name 'phoneSetButtonInfoW';
  4591. function tapiGetLocationInfoA; external TapiDll name 'tapiGetLocationInfo';
  4592. function tapiGetLocationInfoW; external TapiDll name 'tapiGetLocationInfoW';
  4593. function tapiRequestMakeCallA; external TapiDll name 'tapiRequestMakeCall';
  4594. function tapiRequestMakeCallW; external TapiDll name 'tapiRequestMakeCallW';
  4595. function tapiRequestMediaCallA; external TapiDll name 'tapiRequestMediaCall';
  4596. function tapiRequestMediaCallW; external TapiDll name 'tapiRequestMediaCallW';
  4597. {$ENDIF}
  4598.  
  4599. function TAPIERROR_FORMATMESSAGE(ErrCode: INT): INT;
  4600. begin
  4601.   if ErrCode > $FFFF0000 then
  4602.     Result:=ErrCode and $FFFF
  4603.   else if ErrCode and $10000000 <> 0 then
  4604.     Result:=ErrCode - $90000000 + $F000
  4605.   else
  4606.     Result:=ErrCode - $80000000 + $F000
  4607. end;
  4608.  
  4609. function TapiError(ResultCode: longint): Boolean;
  4610. begin
  4611.   Result:=ResultCode < 0;
  4612. end;
  4613.  
  4614. procedure TapiCheck(ResultCode: longint);
  4615. var
  4616.   S: string;
  4617. begin
  4618.   if TapiError(ResultCode) then
  4619.     begin
  4620.       ResultCode:=TAPIERROR_FORMATMESSAGE(ResultCode);
  4621.       {$IFDEF Win32}
  4622.       S := SysErrorMessage(ResultCode);
  4623.       if ( S = '' ) then
  4624.         S := 'Error ' + IntToStr(ResultCode);
  4625.       {$ELSE}
  4626.       S := 'Error ' + IntToStr(ResultCode);
  4627.       {$ENDIF}
  4628.       raise Exception.Create('TAPI error: ' + S);
  4629.     end;
  4630. end;
  4631.  
  4632. end.